Skip to main content

2 replies

PhongVu
Community Manager
Community Manager
December 21, 2021

I don't know where you got the concept of an archive id, but the archive file uri has an index number at the end. However, it's better to just use the uri to download the content. Follow this dev guide to see how to archive.

The First Step
December 22, 2021

Hi @Phong Vu,

I am referring to this here:

screen-shot-2021-12-22-at-22321-pm.png

If I understood the dev guide correctly, running this call will download the file. I also see that:

"To download the file, append a valid access token to the URI and make an HTTP GET request to the URI"

Where would I get the access token?


I found a doc on how to get an access token: OAuth 2.0 > Get Token

Assuming that this is the correct resource I should be looking at, what's the format I should follow when using it with the ringcentral sdk? This is what I currently have but I get an "Unauthorized grant type" error.

rcsdk = SDK(CLIENTID, CLIENTSECRET, SERVERURL)
platform = rcsdk.platform()
platform.login(RCUSERNAME, RCEXTENSION, RCPASSWORD)
response = platform.post('/restapi/oauth/token',{
    'grant_type': password,
    'username': RCUSERNAME,
    'extension': RCEXTENSION,
    'password': RCPASSWORD
})
print(response.text())