Skip to content

Describe the calling key

GET
/content/management/v1/whoami
curl --request GET \
--url https://api.ebitex.io/content/management/v1/whoami \
--header 'Authorization: Bearer <token>'

Reports what the key you are calling with is: the organization it belongs to, the authoring environment it reads and writes, the role it acts as, its own id and name, and its scopes.

A management key is an opaque string, so call this before acting on a key you did not mint yourself: it tells you where your writes will land, and which scopes you hold, so you can skip calls that would only be refused. It works with any valid key, whatever its scopes, so a key that can only publish can still find out that publishing is all it can do.

Key: any valid management key, whatever its scopes.

{ "organizationId", "organizationName", "organizationSlug", "environmentId", "environmentName", "roleId", "roleName", "keyId", "keyName", "scopes": [ … ] }. scopes is sorted.

missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.

payment_required: the organization’s subscription needs attention.

scope_denied: the key lacks this route’s scope. tier_required: the Content Management API needs the Pro plan or above. ip_denied: the caller’s address is outside the key’s allowed ranges. app_not_available: Content is not enabled for the organization.

Rate limit or quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.