Join GitHub today
Access Denied #2
When I currently run npm start I receive the following:
With that, I have two questions. First, the url specified in the response data is url: 'https://platform.devtest.ringcentral.com/restapi/oauth/token', but I assume this should be platform.ringcentral as I am using production credentials for production call logs?
When RC_API_BASE_URL=https://platform.ringcentral.com I still receive the same error message.
Second, in .env I set RC_APP_SECRET to an access token I retrieve with our production credentials prior to running npm start. Does this sound correct?
This is the current response
Server is listening on port: 3000
ANSWER: Two items here:
ANSWER: Please see my response to the former item
ANSWER: No, this is not correct (if you're using this application code directly for testing the ability to download call logs from your account in the Sandbox). The correct workflow is to add the
Using this demo code in Production
Since this code does not have any tests in place, it is not recommended to use in a production environment, but if you want to test using this in your RingCentral Sandbox account and then apply for production (to see how the process works) you are welcomed. If you choose to do this, once you have applied for production access in the RingCentral Developer Portal for this application, and it has been approved, you would just need to:
Sorry for the lack of a response, I was away for a long weekend.
Yes, the above did answer my question. I mistook the RC_APP_SECRET for a token that I had to create, where all I needed to do was obtain it from my account information. Once I correctly entered the RC_APP_SECRET this call log download worked great to obtain our production logs.
Just to note, I did run into the issue I believe you warned me about previously,
"errorCode" : "CMN-201",\r\n "message" : "Service Temporary Unavailable",
This would sometimes be the response when the dates I input were too far apart(over two weeks) or I tried to run this script too often.
To get around this I simply put in shorter date ranges and combined the multiple csvs created.
Thank you for all your help, you went above and beyond.