Posts

Showing posts from December, 2012

Google Webservice Simple API Access in Objective-C

Image
This is as much an aide-mémoire for myself as anything else, but in case you're using the Objective-C Google API client, you may at some point need to use the simple API access method. This is where you pass an API key to identify the call as being under a certain project, rater than using a full OAuth2 authentication flow. This doesn't allow access to personal data, but does mean that any calls will be tracked under the quota for your project, rather than a (lower) IP based quota. It turns out to be very simple. First, go to the API console  and the API Access option on the left menu. At the bottom there will be a simple API access section where you can generate new keys. The "API key" value here is the one you need. Don't worry, I regenerated the key after taking the screenshot! We can then pass the key in as a parameter to the service we create using the APIKey property. In this case I'm using the GTLServicePlus which queries Google+, and using the