Search code examples
user-permissionsringcentral

RingCentral invalid_client [ThirdPartyAppAccess] permission required error


What is the following error and how can I resolve this? The error was thrown when I was trying to do 3-legged OAuth. I also found that only some of the user have this issue. There was no problem if I use my own username to authorize. But some users return this error.

{
  "error" : "invalid_client",
  "error_description" : "[ThirdPartyAppAccess] permission required",
  "errors" : [ {
    "errorCode" : "CMN-408",
    "message" : "[ThirdPartyAppAccess] permission required",
    "parameters" : [ {
      "parameterName" : "permissionName",
      "parameterValue" : "ThirdPartyAppAccess"
    } ]
  } ]
}

Solution

  • To find out information on this permission, call the following endpoint with permissionId = ThirdPartyAppAccess.

    GET /restapi/v1.0/dictionary/permission/{permissionId}
    GET /restapi/v1.0/dictionary/permission/ThirdPartyAppAccess
    

    You will receive the following response which indicates you should enable the "Third Party Apps Access" permission for the user's role in the RingCentral Online Account Portal (https://service.ringcentral.com).

    {
        "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/dictionary/permission/ThirdPartyAppAccess",
        "id": "ThirdPartyAppAccess",
        "displayName": "Third Party Apps Access",
        "assignable": true,
        "readOnly": false,
        "siteCompatible": "Independent",
        "category": {
            "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/dictionary/permission-category/Features",
            "id": "Features"
        },
        "includedPermissions": []
    }
    

    Read more on this permission here:

    https://success.ringcentral.com/articles/RC_Knowledge_Article/5-10-Editing-the-Extension-Permissions-via-Web

    See the following answer for more info which also includes how to check if a user has a permission:

    https://stackoverflow.com/a/50978630/1908967