question

justin-nguyen avatar image
justin-nguyen asked ·

Unauthorized (code 401)

I using Ringcentral.Client in .Net, when I authorize, I get refresh token and access token. I using refresh token to get new access token. I work very nice but after 2 hours I can't send any message and I get exception

401 (Unauthorized): POST https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/sms

But I still recieve event message inbound from another user send to me in method subciption instant message.

I don't understand that. In document, I see refresh token exprire time is 7days, can you explain me about that ?

authorizationsubscriptions
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.

Anirban Sen Chowdhary avatar image
Anirban Sen Chowdhary answered ·

This is strange though ... 401 means there is access issue with credentials or token etc.

Can you make sure and check if you are using right credentials like client_name, secret, password, extension etc correctly and not changed now

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.

justin-nguyen avatar image
justin-nguyen answered ·

I sure client_name, secret, password, extension is correct.Everything working about 2 hours, I can send message and recieve message as usual. But after 2 hours, I get error 401. I'm testing in sandbox

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.