OAuth Redirect URI Problem

Put your problem here if it does not fit any of the other categories.

OAuth Redirect URI Problem

Postby anushree.godbole » Mon Mar 05, 2012 12:07 am

I am developing a location based recommendation service and will be using Eventbrite API for the same. The eventbrite API uses OAuth for basic authentication. When registering the application with Eventbrite API, the application is given a application key and we have to enter a redirect URI that the user will be redirected to after they approve or deny authorization for the app. the problem is that I am not able to set the redirect URI correctly. I have tried various combinations such as http://localhost/,, or some random URI like myapp://oauthresponse but none of them seem to work.

My code is listed below:
public void onCreate(Bundle savedInstanceState) {
myWebView = (WebView) findViewById(R.id.webview);
URL url;
try {
url = new URL("https://www.eventbrite.com/oauth/authorize?response_type=code&client_id=<<my application id>>");
String code = url.getQuery().toString();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block

What I want is that the user be redirected to my application once he authenticates with the API and if the authentication is successful the URL will be sent back with the value of the code. I want to retrieve the code value and store it for future purposes.

Please help!

Thanks in advance.
Once Poster
Once Poster
Posts: 1
Joined: Sun Mar 04, 2012 1:26 pm


Re: OAuth Redirect URI Problem

Postby nuetronprotron » Mon Mar 05, 2012 12:50 pm

Hi anushree,
I can see a problem with your approach is that there is no using of url and getting the connection from url.
Anyway i think the below link might be useful to you

Posts: 37
Joined: Tue Jan 10, 2012 10:22 am


Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 13 guests