Solved

Auth Code Flow getting error OAU-129

  • 5 April 2020
  • 2 replies
  • 1115 views

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

icon

Best answer by Phong1426275020 5 April 2020, 19:14

View original

2 replies

Userlevel 1

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.

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

Reply