question

Andy Brandt avatar image
Andy Brandt asked Andy Brandt answered

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

authentication
1 |3000

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.

1 |3000

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!

1 |3000

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

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys