/rest/api/3/user/recommend API autoCompleteUrl is not accessible

XMLWordPrintable

    • 1

      Summary

      The /rest/api/3/user/recommend?context=Reporter&issueKey=  endopoint autoCompleteUr returned via the below endpoint is not accessible through OAuth token and return 401 error, while it works via Basic Authentication:

      Steps to Reproduce

      Make a call to the following endpoint via OAuth 2.0

      curl --location 'https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/issue/createmeta/{projectIdOrKey}/issuetypes/{issueTypeId}' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer xxxx'

      Using the response you got from the endpoint above, make a get request to the autoCompleteUrl via Oauth 2.0 like the ff:

      curl --location 'https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/user/recommend?context=Reporter&issueKey=' \
      --header 'Authorization: Bearer xxxxx' 

      Expected Results - When accessing the API via Basic OAuth

      When we access the /rest/api/3/user/recommend?context=Reporter&issueKey=  endpoint via Basic OAuth, we receive the following response body:

      [
          {
              "self": "",
              "accountId": "",
              "accountType": "",
              "emailAddress": "",
              "avatarUrls": {
                  "48x48": "",
                  "24x24": "",
                  "16x16": "",
                  "32x32": ""
              },
              "displayName": "",
              "active":,
              "timeZone": "",
              "locale": ""
          },
          {
              "self": "https://api.atlassian.com/ex/jira/{cloud-id}/rest/api/3/user?accountId={account-id}",
              "accountId": "",
              "accountType": "",
              "emailAddress": "",
              "avatarUrls": {
                  "48x48": "",
                  "24x24": "",
                  "16x16": "h",
                  "32x32": ""
              },
              "displayName": "",
              "active":,
              "timeZone": "",
              "locale": ""
          }
      ]

      Results When Accessing the API using OAuth 2.0

      While trying to access the /rest/api/3/user/recommend?context=Reporter&issueKey=  endpoint via Bearer token, we encounter the below error:

      { "code": 401, "message": "Unauthorized; scope does not match"} 

      Workaround

      Currently there is no workaround.

            Assignee:
            Unassigned
            Reporter:
            Rosa Faghihi (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: