Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Webservices API keys

Go to End

4 Posts   2160 Views

Ofir Picazo

Google Summer of Code Hacker, 7 Posts

7 June 2007 at 9:06am

I was thinking we should probably agree on a way of storing the API keys so we can share them amongst the projects.
Do you have any ideas of a good table schema for it?


Core Development Team, 19 Posts

7 June 2007 at 9:53am

That makes sense to me. Typically, we store this sort of information in the _config.php file of the main module for your project (the one with the same name as your project). Using PHP's define function is typically the way to create a constant string for this.

We hope to have the gsoc branch set up in SVN shortly, and adding it to the shared _config.php file will ensure that the other GSoC people have the keys as well.


Administrator, 690 Posts

7 June 2007 at 2:57pm

The other way to set up configuration options is to create static methods on your application's classes. Something like:


This has the advantage of being easy to spot in an API documentation or by browsing the function listing in the code.


Google Summer of Code Hacker, 76 Posts

18 June 2007 at 1:28am

I agree with Sam on the static method implementation. Mashup module classes will follow that standard.