question

Rick Smith avatar image
Rick Smith asked Anirban edited

How to fix refresh access expuired problem

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.

faxpythonrefresh access token
1 |1500 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.

1 Answer

Anirban avatar image
Anirban answered Anirban edited

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

1 |1500 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.

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