yogihosting
yogihosting

Reputation: 6292

Yahoo OAuth 2.0 error - 95022

I am getting error 95022 in my Yahoo app.

My app is online at http://schoonheidsinstituut-antwerpen.com/test.aspx It just has a button whose click event is:

protected void yahooButton_Click(object sender, EventArgs e)
{                         
    string consumerKey = "dj0yJmk9cDVQS2JsZ1B2YnNmJmQ9WVdrOVdrSlRlRXQ2TkRJbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD0zNA--";
    string returnUrl = "http://www.schoonheidsinstituut-antwerpen.com/yahooapi.aspx";
    /*Sending User To Authorize Access Page*/
    string url = "https://api.login.yahoo.com/oauth2/request_auth?client_id=" + consumerKey + "&redirect_uri=" + returnUrl + "&response_type=code&language=en-us";
    Response.Redirect(url);
    /*End*/
}

The dynamic URL formed is

https://api.login.yahoo.com/oauth2/request_auth?client_id=dj0yJmk9WHhNbFFRS2FJc2U2JmQ9WVdrOVdrSlRlRXQ2TkRJbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD0xOA--&redirect_uri=http://www.schoonheidsinstituut-antwerpen.com/yahooapi.aspx&response_type=code&language=en-us

If you simply open this dynamic URL in the browser it is working absolutely well.

What could be the problem? Why it is not opening when the button is clicked?

Anyone who can point out the problem I would be very grateful to him.

Upvotes: 0

Views: 323

Answers (2)

yogihosting
yogihosting

Reputation: 6292

I got the answer for the question, what yahoo was doing was that it was changing the consumer key when permission were changed for the app. See the image i have attached, when i was checking the 'Contacts' checkbox and saving it a new consumer key was generated. That was the problem.

Thank you enter image description here

Upvotes: 0

Hans Z.
Hans Z.

Reputation: 53898

The error is in the client_id parameter. The one in the URL that you pasted differs in the last 6 characters from the one that you have in your PHP variable consumerKey.

Upvotes: 1

Related Questions