I have established a connection via grant type "password" and generated a token in a sandbox environment.
Now, when I do send a request using any URI, I get the error message below:
{ "errorCode" : "CMN-405", "message" : "Login to extension required", "errors" : [ { "errorCode" : "CMN-405", "message" : "Login to extension required" } ] }
My script worked querying get-information in another production app, but with this new app in sandbox, it's asking to login to an extension which I have already signed into:
https://service.devtest.ringcentral.com/application/users/users/default
What is really needed to be done to resolve this issue? Your help would be most appreciated.
update, also I was able to sign into the RingCentral phone app in the Sandbox Environment following the instruction:
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:
- Mac OS
- Windows
Tip: switch to the "sandbox mode" before logging in the app:
- On MacOS: press "fn + command + f2" keys
- On Windows: press "Ctrl + F2" keys
I use our power tool to generate a token and read your sandbox account with my Node JS code. I could read without any problem.
Since you are using PowerShell, I am not an expert in PS so I am not sure what could be wrong, but I am sure that it's something in the code. You can try just for confirming that all params you use and your sandbox is working normal by using one of our SDKs. E.g. the JS SDK. Here is what I just tested. You can perform a full password flow authentication from the code if you want to.
const RingCentral = require('@ringcentral/sdk').SDK RINGCENTRAL_CLIENTID = "ZN6iThZnTp2ZyMWbXxxxyyyyzzz"; RINGCENTRAL_CLIENTSECRET = "aaaabbbbbccccc-20PRI1YdAYAv5l0VtUJQaiOaztJOT_mlg"; RINGCENTRAL_SERVER = 'https://platform.devtest.ringcentral.com' var rcsdk = new RingCentral({ server: RINGCENTRAL_SERVER, clientId: RINGCENTRAL_CLIENTID, clientSecret: RINGCENTRAL_CLIENTSECRET }); var platform = rcsdk.platform() var tokensObj = { "access_token" : "valid-access-token", "token_type" : "bearer", "expires_in" : 3600, "refresh_token" : "abc", "refresh_token_expires_in" : 604800, "scope" : "ReadAccounts RoleManagement" } setToken() async function setToken(){ await platform.auth().setData(tokensObj) if (platform.loggedIn()){ console.log("already logged in") read_account() }else{ console.log("Tokens expired => Need to relogin!!!") } } async function read_account() { try{ var resp = await platform.get('/restapi/v1.0/account/~/') var jsonObj = await resp.json() console.log(jsonObj) }catch(e){ console.log(e.message) } }
1. No Authentication issue generating the token.
2. Any URI I use this error message generate.
3. $ClientID = "ZN6iThZnTp2ZyMWbXeb3OA"
And you authenticated with the username and password of the user John Lee? How about if you authenticate with the user name and password of Ming Lee, the super admin in your sandbox account?
Hi Phong,
3 things I have tried and validated:
1. tried the sandbox account number with extension 101, gets same result
2. tried the sandbox Ming's phonenumber (4378262905) with extension 101, gets same result
3. tried the sandbox John's phonenumber (4378262508) with extension 102, gets same result
*elevated the John's role as Super Admin as well
I don't have problem getting the token validating the required credential though.
The same script with other production app does pull extension and account info.
I really hope this gets fixed and get production environment approved.
It will reject any URI request because the requirement is not met, what does it means by sign into the extension? I could generate the password of the account and used it to establish the api connection.
Tell me what exactly you did. Which API returns that error? And your app client id.
Thank you for your help Phong Vu, I found out that my script had an error on pointing the token correctly, it was caching from previous session.
I was able to query and edit the extension.
Have a great day Sir!
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder