me

Create a new API token

Changed on

The plaintext token is returned only once.

post/me/api_tokens/

Request

  • Base URL
    https://dados.gov.pt/api/1
  • URL
    https://dados.gov.pt/api/1/me/api_tokens/
  • Auth
    none declared

Headers

X-Fieldsstring mask

An optional fields mask

Request body

ApiToken2028write29 required(unresolved $ref)

Response

Success

created_atstring date-time required

Token creation date

expires_atstring date-time

When this token expires

idstring required
kind'api_key'

Token type

last_used_atstring date-time

Last time this token was used

namestring

User-given label for this token

revoked_atstring date-time

When this token was revoked

scopesstring[]

Token scopes

token_prefixstring required

First characters of the token for identification

user_agentsstring[]

User agents that have used this token

tokenstring

The plaintext token (shown only once at creation)

Example response

{
  "kind": "api_key",
  "scopes": [
    "admin"
  ]
}

Changes