Can not add contact for user

  • 1
  • Problem
  • Updated 3 weeks ago
I got a list of all users of my application in the sandbox at
https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension
Now I'm inserting the id into the ExtensionId and getting the "errorCode"
error: "CMN-408",
   "message": "In order to call this API endpoint, user needs to have [EditPersonalContacts] permission for requested resource."

How do I grant access rights for this action?
Photo of Alexey Shpilka

Alexey Shpilka

  • 324 Points 250 badge 2x thumb

Posted 3 weeks ago

  • 1
Photo of Alexey Shpilka

Alexey Shpilka

  • 324 Points 250 badge 2x thumb
user for whom I add contact 
Photo of Tyler Long

Tyler Long, Official Rep

  • 5,720 Points 5k badge 2x thumb
Could you please try to get token via super admin extension(normally extension number 101)?  Then I guess you can use the token to edit every extension's data.
Photo of Phong Vu

Phong Vu, Devangelist

  • 2,136 Points 2k badge 2x thumb
Hi Alexey,

Adding contact is at extension level, which means if you login with the 101 extension, you can only add/edit contact of the 101 extension. In order to add/edit contact for extension 102, you must login with login credentials for the extension 102. This is the same as when you login the https://service.devtest.ringcentral.com with an admin extension (e.g. 101), if you choose the "Admin Portal", you won't see any option for adding user contact at all. Only when you select "My Extension" option, you will be able to add/edit contact for the extension 101.

+ Phong
Photo of Alexey Shpilka

Alexey Shpilka

  • 304 Points 250 badge 2x thumb
if I authorize under the second user through api I get an error
{"error":"invalid_grant","error_description":"Invalid resource owner credentials","errors":[{"errorCode":"OAU-140","message":"Invalid resource owner credentials"}]}
Photo of Phong Vu

Phong Vu, Devangelist

  • 2,136 Points 2k badge 2x thumb
As the error message said, it is just because you have wrong username/password for the user extension.
Photo of Alexey Shpilka

Alexey Shpilka

  • 304 Points 250 badge 2x thumb
I am authorized by this information to https://service.devtest.ringcentral.com user 102
(Edited)
Photo of Phong Vu

Phong Vu, Devangelist

  • 2,136 Points 2k badge 2x thumb
The username must be the phone number of the extension 102. Not the email address.
(Edited)
Photo of Tyler Long

Tyler Long, Official Rep

  • 5,658 Points 5k badge 2x thumb
try username=13127675868&extension=&password=*****

13127675868 is direct number, and extension could be blank.