Looks like both auth token and refresh token has expired. Please suggest how to get new token.
Application name is ‘Actin’ and client_id is ‘LKszrWSjS26fhbXY7xB9Kw’
this is response i am getting using refresh token through postman.
{ "error": "invalid_grant", "errors": [ { "errorCode": "OAU-212", "message": "Token type mismatch" } ], "error_description": "Token type mismatch" }
There must be something incorrect in the way you authenticate or using the code to exchange for tokens. What endpoint you use in Postman to get the token? What language is your app actually written in?
Language is C# dot net.
Endpoint: https://platform.ringcentral.com/restapi/oauth/token.
Why you called the "/oauth/token" endpoint with those params? That is for getting a new access token using a refresh token.
In this case, you are logging in and you just get the code. You have to use the code to exchange for tokens.
- The grant_type must be set to "authorization_code"
- The code must be set with the code value you get in the call back
See this reference for more explanation.
I did that but it says account does not exist.
this is the account number 18478076161
client id : LKszrWSjS26fhbXY7xB9Kw
Again, it must be messed up somewhere.
You said you are using C# .NET, why you show me Postman. What is the reason of mixing the authorization process?
Shared postman here for an example. there is no mixing of process happening. after getting code. application is making call to below method of ring central client and throwing exception.
using RingCentral.Client.2.3.4\lib\RingCentral.dll public Task<TokenInfo> Authorize(string authCode, string redirectUri);
this is client object:
this is token object:
this is the exception message contain request body and post url
POST https://platform.ringcentral.com/restapi/oauth/token failed. An error occurred while sending the request. Request body: grant_type=authorization_code&redirect_uri=http%3A%2F%2Flocalhost%3A59236%2FAccount%2FAuthorizeRingCentralCallBack&code=SUFEMDFQMTZQQVMwMHxBQUJBaUpZcmlPZ3pacVE2Z2hGenlEY0V6OXU4UjRnOFNFVVV1Ql9DT1dkTFBvS3ZPSUM3a29aSHRWSGRrc25aVV9ETGRlZkd1RVRPdVdIei1UaVA0MjNfWl8tTjNkZkFPLW5xNjVJRnJMU0d1S0xUU3BhV3MzY0xNMVlWeHZUUThaNWM5UGxqTkEzcnJlMkFDOHZJbWhnVDU0cjNEV3d1YlhnTXxCRzdNN1F8Z1VHSFRRRlZpNjc5RVoxd0k2TUFGd3xBUQ&access_token_ttl=3600&refresh_token_ttl=604800
It looks like you are using the very old .NET SDK. Can you check and update using the latest SDK version 5.x.x?
I can't do it right away. we are not even on RingCentral.Net https://www.nuget.org/packages/RingCentral.Net/ we are on RingCentral.Client https://www.nuget.org/packages/RingCentral.Client/ and latest stable version of that is 3.0.0.
Response is coming null in application.
so can you please check why its saying "Account does not exist" from postman. I can share Authorization header information separately by which ever means. I think issue is with using account credentials but how its validating those credentials.
can you please check what error is getting logged at your end with this call. we can go from there at least for now.
Issue is fixed. thanks
The RingCentral.Client is very old and there is no update to that package for years. Once you have time to port, please port your code to use the latest .NET
and then
after Authorize click it redirects to call back with code but that is invalid.
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder