Skip to content

Describe the calling key

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

Reports what the Assets management key you are calling with is: the organization it belongs to, its own id and name, and its scopes.

It works with any valid management key whatever its scope, so a key that can only read can find out that reading is all it can do. assets.management.write includes everything assets.management.read does. assets.management.delete, the top level, also lets the key delete an asset and always comes with the other two, so a key that can delete lists all three, sorted.

Key: an Assets management key (assets.management.read or assets.management.write).

{ "organizationId", "organizationName", "organizationSlug", "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 is not an Assets management key. permission_denied: a read key was used for a write. app_not_available: Assets is not enabled for the organization. origin_denied or ip_denied: the key was used from an origin or address outside its restrictions.

too_many_failed_authentications: too many bad keys from this address; rate_limited: too many requests from the organization. Retry-After says how long to wait.