Get a Personnal Access Token

In order to simplify access to InterCloud resource, users can create personal access tokens.

These tokens have configurable expiration time and can be revoked by users thanks to the REST API.

Once a user has received an access token, he can create a personal access token with the following curl call:

curl 'https://api-console-lab.intercloud.io/personal/tokens' \
  -H 'authorization: Bearer 15rvofFMSr6-7vf60LCRwg' \
  -H 'content-type: application/json' \
  --data-binary '{
    "name":"personal token",
    "comment":"Jenkins Token",
    "scope":"everything",
    "expiresIn":65535
  }'
{
  "access_token":"jU1pnEAeRtaxlesHGD_nlg",
  "expires_in":65535,
  "scope":"everything",
  "token_type":"Bearer"
}

The new access token can be used in any request in the Authorization header:

  -H "Authorization: Bearer jU1pnEAeRtaxlesHGD_nlg"