question

Andy Brandt avatar image
Andy Brandt asked ·

Auth Code Flow getting error OAU-129

Hello, i'm trying to use the Auth Code Flow and getting error OAU-129 (Access Token Corrupted). Basically what's happening is the follows:


1. Successfully Authenticate, and get token

2. Next, future attempts to authenticate using the returned token may or may not work, it appears to work once or twice, but after that i typically get the above mentioned error.


I know the auth token expires in an hour, and this is still within that expiry time.

Is the auth token once good for a certain # of auth attempts?

I've also tried using the refresh token after getting that error, and I get OAU-213 - Token not found when using that.


If it helps, i'm testing this using the Production environment, and i'm using the C# SDK as well.


I'm currently testing with a simple console app, that basically calls .AuthorizeUri(), then .Authorize() (which both work fine), then i'm saving the returned token to a file. After those two calls, I am able to successfully call the other methods that require authentication.

When I run the app a second time, it loads the token from the file, then sets it using the RestClient.token property (after checking to make sure it isn't expired). then, i try calling other RestClient methods, such as RestClient.RestApi().Account().Extension().Get() (which work fine after the initial Authorize() call) and that when i'm getting the errors.


Hopefully that all makes sense. If you need more info, please let me know.


Edit: upon further testing, i'm now getting "OAU-213 - Token not found" every time after authenticating successfully for the first time, trying both the access token, and trying to refresh using the refresh token.


Andy

auth code flowauth token
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered ·

Please read the answer from this thread to see if that is the cause of your problem too. If not, please share a few line of code where you authenticate and reuse the token.

Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Andy Brandt avatar image
Andy Brandt answered ·

ahh, so Dispose() is doing a revoke. that makes sense, and it's probably my issue. thanks!

Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.