Reputation: 31
I am developing an in-house OS X application using Cocoa and Objective-C that needs to access the Eventbrite API via OAuth 2.0
Because it is an in house application it will be considered a trusted app that will access Eventbrite using a fixed username and password so it seems to make sense to se the Username and Password flow of OAuth 2.0.
I am using the OAuth2Client framework from gitHub but it just gets HTTP: 400 errors when I set it up to use https://www.eventbrite.com/oauth/authorize as the authorization URL and https://www.eventbrite.com/oauth/token as the token URL. It's the 2nd URL that seems to cause the 400.
The Eventbrite API website says it supports full OAuth 2.0 spec but there are no examples of using Username and Password flow and they have no Objective-C examples at all. I am hoping someone can point me to an example of connecting to Eventbrite in Objective-C using OAuth 2.0 username and password flow so I know it is at least possible.
Upvotes: 3
Views: 818
Reputation: 1982
Eventbrite has implemented the OAuth2.0 User-Agent flow (rather than the Username and Password Flow).
A simple client-side User-Agent interaction demo is available in their GitHub examples section: http://eventbrite.github.com/oauth2-example.html
Authenticating using an email and password combo is not encouraged - but it is possible to send those authentication tokens to the user_get API method, which will return a user_key in the response.
This user_key can then be used to sign subsequent API requests, just like the OAuth2.0 access_token would allow you to do.
The Eventbrite developer authentication guide contains an overview of the available authentication schemes.
Upvotes: 0