Skip to navigation

Read the calling API key

The API key that made the request: its id, its environment (test or live) and the scopes it holds. Never its secret or prefix. Needs no scope, so any valid key may read itself; use it to offer only the actions the key allows. The scopes are still enforced on every call.

Authentication

X-API-Keystring

API key for one environment of your account. Keep server-side; never expose in browser clients.

Response

Successful Response
environmentenum

test for a pk_test_ key: fixture results, nothing charged.

Allowed values:
idstring or null
The key's id, as the Platform's API keys page lists it. Null for a key configured outside the Platform.
scopeslist of strings
The scopes the key holds, sorted.
object"api_key"OptionalDefaults to api_key

Always api_key.

Errors

401
Unauthorized Error
403
Forbidden Error