Permissions .: Show

API Reference / v15

Show a Permissions Request

This endpoint returns details about an existing permissions request, including whether it has been accepted or rejected, and the associated token if applicable. Only the app which created the permissions request is authorized to call this endpoint.

Request Endpoint

GET /v15/apps/permissions_requests/:id

Authorization Required – App Token in Header

Authorization: token 1061-c6b2aa0c3062c4c019ea08a1143c782c20b32467ad35faaa14e19d72c0ba68

cURL Example

curl https://sandbox.thelevelup.com/v15/apps/permissions_requests/1135 \
  -H 'Accept: application/json' \
  -H 'Authorization: token 1061-c6b2aa0c3062c4c019ea08a1143c782c20b32467ad35faaa14e19d72c0ba68'

Example Response

HTTP/1.1 200 OK

{
  "permissions_request": {
    "app_id": 45,
    "email": "guy@example.com",
    "id": 205,
    "permission_keynames": ["create_orders"],
    "state": "accepted",
    "token": null
  }
}

Response Parameters

Param Type Description
app_id Integer The LevelUp App ID
email String The email address of the user who was sent the permissions request
id Integer The LevelUp permission request ID
permission_keynames Array Types of permissions requested
state String State of request (Will be pending until the user approves or rejects the request)
token String The access token granted by the permissions request (if accepted, otherwise null)

Errors

HTTP/1.1 404 Not Found - The permissions request does not exist, or belongs to a different app