Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Generating EDL User Token via the API.

Anchor
createtokenApi
createtokenApi

/api/users/token

Allowed Methods

...

Creates a new user token.  `Authorization: Basic` header  with Base64 encoded user credentials is required for creating a new user token.

Authorization: Basic (user-username:user-password Base64-encoded)


Examples

Notes

Request

Response

Status Code 200 with user credentials in the header

curl --request POST \
  --url 'http://localhost:3000/api/users/token -H 'Authorization: Basic Base64encodedcredentials"

Status Code: 200


{

"access_token":"EDL-Ued17ddb5f6a6afdceba7560d2b058777adfd2fd4b730c90ec46ad3a9602",

"token_type":"Bearer",

"expiration_date":"07/14/2021"

}

If the user already has maximum allowed(2) user tokenscurl --request POST \
  --url 'http://localhost:3000/api/users/token -H 'Authorization: Basic Base64encodedcredentials"

Status Code: 403


{
  "error":"max_token_limit","error_description":"User already has maximum number of tokens."
}

Invalid credentials or Missing header with credentials

Status Code: 401

{
  "error":"invalid_credentials",

"error_description":"Invalid user credentials"
}