Account

The account object

The account the API key belongs to: your organization, and the key of the request with its scopes and its expiry.

Attributes

idstring
Unique identifier for the object: your organization's reference on the platform.
objectenum
String representing the object's type. Always account.
Possible values
  • account
api_keyobject
The API key of the request.
Child attributes
idstring
The key's reference, as the admin console shows it (not its secret).
scopesarray of enum
What the key may read: its scopes, sorted. A client must accept a value it does not know.
Possible values
  • events_read
  • registrations_read
  • calls_for_papers_read
expires_attimestampnullable
When the key expires, in Unix seconds (UTC): from then on it is refused (api_key_invalid); null when the platform gave no expiry.
Example object
{
  "id": "ORG-7b2c9e40-1a5d-4c83-9f6e-3d8a0b4c2e71",
  "object": "account",
  "api_key": {
    "id": "APIK-4f8a2c1e-9b3d-4e6a-8c7f-2a1e5d9b0c34",
    "scopes": [
      "calls_for_papers_read",
      "events_read",
      "registrations_read"
    ],
    "expires_at": 1824076800
  }
}

Retrieve the account

GET/v1/account

Retrieves the account the API key belongs to: your organization's id, and the key's id, scopes and expiry. Any valid key may call it, whatever its scopes: it is the call to check that a key works.

Works with any valid key.

No parameters.

Returns

Returns the account object.

Request

curl

curl -G https://api.masterconf.com/v1/account \
  -H "Authorization: Bearer mcf_your_key"

JavaScript

const res = await fetch("https://api.masterconf.com/v1/account", {
  headers: { Authorization: "Bearer mcf_your_key" },
});
const data = await res.json();

Python

import requests

res = requests.get(
    "https://api.masterconf.com/v1/account",
    headers={"Authorization": "Bearer mcf_your_key"},
)
data = res.json()
Response
{
  "id": "ORG-7b2c9e40-1a5d-4c83-9f6e-3d8a0b4c2e71",
  "object": "account",
  "api_key": {
    "id": "APIK-4f8a2c1e-9b3d-4e6a-8c7f-2a1e5d9b0c34",
    "scopes": [
      "calls_for_papers_read",
      "events_read",
      "registrations_read"
    ],
    "expires_at": 1824076800
  }
}