---
title: "Get granted scopes"
url: "https://nov18-dev.movespot.fyi/apis/portal-developer-applications-2/versions/3bce3c1f-0ff6-442b-b037-768253e6d227/operations/get-application-granted-scopes"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/portal-developer-applications-2/versions/3bce3c1f-0ff6-442b-b037-768253e6d227.md

# Get granted scopes

`GET` `/api/v3/applications/{applicationId}/granted-scopes`

Operation ID: `get-application-granted-scopes`

Retrieves the [granted scopes](https://docs.konghq.com/konnect/dev-portal/applications/dynamic-client-registration/auth0/) of a specified application and API directly from the IDP. Scopes shared between APIs will be returned, even if not currently registered for given API. Will return 422 if this feature is not supported by the application.

## Path parameters

- `applicationId` (string, uuid, required) - Id of the targeted application

## Responses

- `200` - Get granted scopes response.
- `401` - Unauthorized
- `404` - Not Found
- `422` - Get granted with application using unsupported IDP.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Portal Developer Applications
  version: 3.3.3
paths:
  /api/v3/applications/{applicationId}/granted-scopes:
    get:
      operationId: get-application-granted-scopes
      summary: Get granted scopes
      description: |
        Retrieves the [granted scopes](https://docs.konghq.com/konnect/dev-portal/applications/dynamic-client-registration/auth0/) of a specified application and API directly from the IDP.
        Scopes shared between APIs will be returned, even if not currently registered for given API.
        Will return 422 if this feature is not supported by the application.
      parameters:
        - $ref: "#/components/parameters/ApplicationId"
      responses:
        "200":
          $ref: "#/components/responses/GetGrantedScopesAPI"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "422":
          $ref: "#/components/responses/GetGrantedScopesAPI422Response"
      security:
        - portalAccessToken: []
      tags:
        - Applications
security:
  - portalAccessToken: []
components:
  parameters:
    ApplicationId:
      name: applicationId
      in: path
      required: true
      description: Id of the targeted application
      schema:
        type: string
        format: uuid
  responses:
    GetGrantedScopesAPI:
      description: Get granted scopes response.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/GetGrantedScopesAPIResponse"
          examples:
            GetGrantedScopesAPI200Response:
              $ref: "#/components/examples/GetGrantedScopesAPI200Response"
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnauthorizedError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/UnauthorizedExample"
    NotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/NotFoundError"
          examples:
            NotFoundExample:
              $ref: "#/components/examples/NotFoundExample"
    GetGrantedScopesAPI422Response:
      description: Get granted with application using unsupported IDP.
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnprocessableContentError"
          examples:
            GetGrantedScopesAPI422Example:
              $ref: "#/components/examples/GetGrantedScopesAPI422Example"
  schemas:
    GetGrantedScopesAPIResponse:
      type: object
      properties:
        scopes:
          $ref: "#/components/schemas/RefreshedGrantedScopes"
      additionalProperties: false
      required:
        - scopes
    UnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 401
            title:
              example: Unauthorized
            type:
              example: https://httpstatuses.com/401
            instance:
              example: kong:trace:1234567890
            detail:
              example: Invalid credentials
    NotFoundError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 404
            title:
              example: Not Found
            type:
              example: https://httpstatuses.com/404
            instance:
              example: kong:trace:1234567890
            detail:
              example: Not found
    UnprocessableContentError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 422
            title:
              example: Unprocessable Content
            type:
              example: https://httpstatuses.com/422
            instance:
              example: kong:trace:1234567891
            detail:
              example: Unprocessable Content
    RefreshedGrantedScopes:
      description: List of granted scopes, directly updated from the IDP
      type: array
      items:
        type: string
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: >
            The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an
            integer.
          type: integer
          readOnly: true
        title:
          description: |
            A short, human-readable summary of the problem. It should not
            change between occurences of a problem, except for localization.
            Should be provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: |
            Used to return the correlation ID back to the user, in the format
            kong:trace:<correlation_id>. This helps us find the relevant logs
            when a customer reports an issue.
          type: string
          readOnly: true
        detail:
          description: >
            A human readable explanation specific to this occurence of the
            problem.

            This field may contain request/entity data to help the user
            understand

            what went wrong. Enclose variable values in square brackets. Should
            be

            provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
      required:
        - status
        - title
        - instance
        - detail
      title: Error
  examples:
    GetGrantedScopesAPI200Response:
      value:
        scopes:
          - openid
    UnauthorizedExample:
      value:
        status: 401
        title: Unauthorized
        instance: kong:trace:8347343766220159418
        detail: Unauthorized
    NotFoundExample:
      value:
        status: 404
        title: Not Found
        instance: kong:trace:6816496025408232265
        detail: Not Found
    GetGrantedScopesAPI422Example:
      value:
        status: 422
        title: Unsupported IDP
        type: https://kongapi.info/konnect/portal/granted-scopes-unavailable
        detail: This feature is not supported by the application.
        instance: kong:trace:2724154947768991354
  securitySchemes:
    portalAccessToken:
      type: apiKey
      in: cookie
      name: portalaccesstoken
      description: >
        The Developer portal cookie is meant to be used by the Developer API to
        authenticate with.
```
