Question

How to fix refresh access expuired problem

  • 30 October 2020
  • 1 reply
  • 730 views

refresh token has expired problem.


Using this code to try to send a fax


platform = rcsdk.platform()
#platform.auth().refresh_token() #No good
platform.auth().data() #No good
platform.refresh() #Try this ...No good
#platform.login("+nnnn", "101", "password")
accountId = 'https://platform.devtest.ringcentral.com/restapi/v1.0/account/~'
extensionId = '101'
recipient="+1800555..."
builder = rcsdk.create_multipart_builder()
builder.set_body({
'to' :[{'phonenumber': recipient}],
'faxresolution': "High'",
'coverPageText': "This is a fax page sent to you automatically from"
})
request = builder.request(f'/restapi/v1.0/account/{accountId}/extension/{extensionId}/fax')
resp = platform.send_request(request)


I know, the token expires after 7 days, but can't seem to find a way to refresh it? Or do I have to recreate the app from scratch in the sandbox, very disconcerting.


1 reply

As per I know RC SDK takes care of the token lifecycle and refresh tokens automatically .

Check the below thread, if they helps you

https://community.ringcentral.com/questions/1298/refresh-token-has-expired-in-python.html

https://stackoverflow.com/questions/45375954/ringcentral-js-sdk-refresh-token-is-missing

Reply