Get an Access Token

GET /v1/access_tokens/{id}

Get one access token.

Request Parameters

Location Data Item Type Required/Optional Description
path id string required The alphanumeric ID of the access token to get.

Example Request

GET /v1/access_tokens/abcd1234 HTTP/1.1
Host: api.ampermusic.com
Authorization: Basic abcxyz

Response Data

Location Data Item Type Description
body data object
body data.type string The type of data (access_tokens in this case).
body data.id string The permanent ID of this access token.
body data.attributes object
body data.attributes.access_token_redacted string A short, redacted snippet of the beginning of the secret token.
body data.attributes.display_name string A human-readable name for this access token, to allow for easier identification.
body data.attributes.date_create string The date when this access token was created.
body data.attributes.date_access string The date when this access token was last used to perform any API request.
body data.links object
body data.links.self string The token URL.

Note: All dates are formatted as ISO-8601 date and time strings. For example, 2018-08-08T08:08:08+00:00.

Example Response

Header

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
ETag: W/"837ab82642de74bae1fe984370593e10ff230343"

Body

{
    "data": {
        "type": "access_tokens",
        "id": "abcd1234",
        "attributes": {
            "access_token_redacted": "abcd1234***",
            "display_name": "Token for my very first app",
            "date_create": "2018-10-04T00:00:00.000000+00:00",
            "date_access": null            
        },
        "links": {
            "self": "https://api.ampermusic.com/v1/access_tokens/abcd1234"
        }
    },
    "links": {
        "self": "https://api.ampermusic.com/v1/access_tokens/abcd1234"
    }
}