Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

AccessToken returning 401 and rejecting my Request Token

Started by Ed Sullivan -   in API Authentication

I get through the RequestToken and Authorize steps of the 3-legged process just fine. However when I call AccessToken I get a 401 error.

Here are the details for why

oauth_problem=token_rejected
oauth_problem_advice=Token **** does not match an expected ACCESS token"

However, the token they are giving me in the error(I have masked as ****) is the exact token that is returned to me as the oauth_token parameter in the url string.

I tried playing with the oauth version that I am sending ("1.0","1.0a","1a").

I am not using the org parameter at all during my call to AccessToken, but I thought I only needed this for the subsequent api call. Could this be the issue?

Also, I am not sending an oauth_session_handle. Could this be the issue?
Nevermind. I got it to work by taking out the AccessToken oauth_verify parameter
 

Ed Sullivan