Get the current credential
GET
/v1/me
const url = 'https://api.inboxcnx.com/v1/me';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.inboxcnx.com/v1/me \ --header 'Authorization: Bearer <token>'Returns the organization, application and scopes of the credential that makes the call, so you can check a new key or token before using it. A grant token also returns its grantId.
No scope required.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The calling credential’s organization, application and scopes
Media typeapplication/json
object
organizationId
required
string
applicationId
required
string
scopes
required
Array<string>
grantId
string
Example
{ "organizationId": "0f6b2c1e-8d4a-4e7b-9c3f-2a1b0c9d8e7f", "applicationId": "a3c1e8f2-4b7d-4e9a-9f10-6d2b8c5e7a41", "scopes": [ "read:messages", "write:webhooks" ]}Missing or invalid credential
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}