跳转到内容
Maple

Grants

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.

此内容尚不支持你的语言。

GEThttps://api.maple.inc/v1/grants/{grantId}API key

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. 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

  • grantId string path required

Responses

200 OK

  • object string required

    Always grant.

  • id string required

  • location_id string required

  • livemode boolean required

  • status string required

    One of active, revoked.

  • origin string required

    One of install, staff, test.

  • scopes string[] required

  • pending_scopes string[] required

  • created number required

  • revoked_at number or null required

Errors

  • 400 Bad request Invalid request (invalid_request_error)

  • 401 Unauthorized Missing or invalid credential (authentication_error)

  • 403 Forbidden Not allowed (permission_error)

  • 404 Not found Not found (invalid_request_error)

  • 429 Too many requests Rate limit reached (rate_limit_error)

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.