Permissions .: Show Pending

API Reference / v15

Show the Currently Pending Permissions Request

This endpoint returns details about the current pending permissions request for a user. A user may only have one pending permissions request at a time.

Request Endpoint

GET /v15/permissions_requests

Authorization Required – User Token in Header

Authorization: token 1123-15d2aeedc9f4e0e7094a9d283868f8fbe873cb85ceaa0c511727245aec8c9e

cURL Example

curl https://sandbox.thelevelup.com/v15/permissions_requests \
  -H 'Accept: application/json' \
  -H 'Authorization: token 1123-15d2aeedc9f4e0e7094a9d283868f8fbe873cb85ceaa0c511727245aec8c9e'

Example Response

HTTP/1.1 200 OK

{
  "permissions_request": {
    "accept_text": "Accept",
    "app_id": 45,
    "created_at": "2014-06-08T22:16:23-04:00",
    "description": "Ariburgers has requested to be added to your LevelUp account and would like the following permissions",
    "id": 8058,
    "reject_text": "Reject",
    "state": "pending",
    "permissions": [
      { "permission": { "keyname": "create_orders", "description": "Create orders on your behalf" } }
    ]
  }
}

Response Parameters

Param Type Description
accept_text String Text for user to select to accept
app_id Integer The requesting a app’s ID
created_at String Time when the permissions request was created in ISO standard format 8601
description String Descriptive text about the permissions request
id Integer The permissions request ID
reject_text String Text for user to select to reject
state String State of request (Will be pending until the user approves or rejects the request)
permissions Array Array of requested permission details