Grants
Get grant
Returns one of the app's grants in the key's mode, active or revoked. 404 for another app's grant or one in the other mode.
https://api.maple.inc/v1/grants/{grantId}API keyReturns one of the app’s grants in the key’s mode, active or revoked. 404 for another app’s grant or one in the other mode. Needs locations:read.
Authorization
Send your API key as Authorization: Bearer <key>: mpk_test_… for test mode, mpk_live_… for live mode. Both use https://api.maple.inc/v1. See Authentication. The samples read the key from MAPLE_KEY and the base URL from MAPLE_BASE, as set up in the Quickstart.
Parameters
grantIdstring required
Responses
200 OK
-
objectstring requiredAlways
grant. -
idstring required -
location_idstring required -
livemodeboolean required -
statusstring requiredOne of
active,revoked. -
originstring requiredOne of
install,staff,test. -
scopesstring[] required -
pending_scopesstring[] required -
creatednumber required -
revoked_atnumber or null required
Errors
-
400Bad request -
401Unauthorized -
403Forbidden -
404Not found -
429Too many requests
Every error body is one error object: branch on its type and code; message is for people, param names the field at fault, and doc_url links the code on Errors.
A 429 also sends Retry-After: Seconds to wait before retrying; also returned as error.retry_after in the body.