Access Tokens

List access tokens

Lists access tokens. Returns every token on the instance unless narrowed with the account argument. Token values are never returned - only the id each token is listed under.

get/v1/tokens

Request

  • Base URL: https://your-emailengine-host
  • URL: https://your-emailengine-host/v1/tokens
  • Auth: HTTP bearer

Query parameters

pageinteger

Page number (zero indexed, so use 0 for first page)

pageSizeinteger

How many entries per page

Example:20
querystring

Filter by description, id or account

Example:agent
accountstring

Only list tokens bound to this account. Omit to list every token on the instance

Example:user123

Headers

x-ee-timeoutinteger

Request timeout in milliseconds. Raises the command timeout above the EENGINE_TIMEOUT default for a long-running request; a value below the default has no effect

Example:30000

Response

Returns the matching access tokens. Token values are never returned after creation.

accountstring nullable

The account filter that was applied, or null when every token was listed

totalinteger

How many tokens match

pageinteger

Current page (zero indexed)

pagesinteger

Total page count

Example response

{
  "account": "user123",
  "total": 12,
  "pages": 1,
  "tokens": [
    {
      "account": "user123",
      "description": "Token description",
      "metadata": "{\"example\": \"value\"}",
      "ip": "127.0.0.1",
      "remoteAddress": "127.0.0.1",
      "scopes": [
        "api"
      ],
      "restrictions": {
        "referrers": [
          "*web.domain.org/*",
          "*.domain.org/*",
          "https://domain.org/*"
        ],
        "addresses": [
          "1.2.3.4",
          "5.6.7.8",
          "127.0.0.0/8"
        ],
        "rateLimit": {
          "maxRequests": 20,
          "timeWindow": 2
        }
      },
      "permissions": {
        "actions": [
          "read"
        ],
        "groups": [
          "message",
          "mailbox"
        ]
      },
      "created": "2021-02-17T13:43:18.860Z",
      "expires": "2021-02-17T14:43:18.860Z",
      "access": {
        "time": "2021-02-17T13:43:18.860Z",
        "ip": "127.0.0.1"
      },
      "id": "1bc12baf7f0d5e51fe0a4e0eda06e1be5b8d6cc2c66b95dc0fbe4d2e9f5d5e1a"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.