Skip to content

API Access Token

The cloud also supports the use of time limited access tokens to provide restricted access to some APIs. This allows creation of a token that can be shared with a third party service or secondary system to allow access to a single service or a subset of media and log files.

This is intended to be used for short term access and tokens have a maximum duration of 12 hours currently.

Note

Unlike basic authentication, access tokens are only usable against the regional endpoint they are generated for. This means they must be addressed to the region specific endpoints, i.e. https://ws-[cloudID].aculabcloud.net.

Authorisation

This API uses basic authentication, using your cloud account username and API Access Key.

Username : cloudID/username (e.g. 1-2-0/bob@example.com)
Password : API Access Key

Generating a new token

Allows the account owner to create a new access token and specify the permissions for the token being generated

Request

URL : https://ws-[cloudID].aculabcloud.net/access-token/new-access-token
Methods : GET, POST
Parameter Value Description
service string (optional) An outbound service name that this token is allowed to start
filetypes string (optional) File types to allow access to, allowed values are "media", "rest_logs". Can be specified as a comma separated list or declared multiple times
file_prefix string (optional) If specified restricts file access operations to paths that begin with this prefix
media_write string (optional) Accepted values, "true" if set allows this token to perform write, move, delete operations on media files.
ttl string (optional) The time to live of the access token in seconds, must be between 60 & 43200

Response

Returns an api access token as a json string

Parameter Value Description
api_access_token string The new API Access token

Example

Request
https://ws-1-2-0.aculabcloud.net/access-token/new-access-token?service=MyOutboundService&filetypes=media&prefix=/appfolder
Response
"eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIiwia2lkIjoiOXBsX0RYV1pKbExoY1VueWZoYVh0d2praUtSSlBQQ2lkaUhTR0tMVXd5ZyJ9.httu56IvTWTkqAtzQTbUmfbPp5lzbhSX7-rwIA2-gnYh7GR83Ks7-SNR6SNuBZZipIWza4HP3LSY8hE_Y-1k9i1KirwCHSsoIsaU5zQZSciBbNH7xJsaWikJA3hnot64QMdpRCpgaJlpFGf70Xs4zxMKpFCKaAD9RkgyNobkIZnSUTfI2A20YsF0YPHpFvE6ElWQgtoTzBVQX1_cvstuaesMmirvvy91m286UH51UiIKlm3keFzPOALfnMqTfnEv-scnyFq3aBxZ82H-elRRZsVkZQSxYZbI1IQe6_rG4PI6hZj3aAHDh5AbLFSiSPArYOfMJnh2V42mrv9xYNQLJA.smuTRVegngBkJDlkFwHY-Q.DatgFsDRAR4rfA7x1jzjr9wPWu2iTp1Qm1msTZzU8EJiohDUS4_tM5gsxqJmQtCYwecZA8A4JS66Fx-vmRjzOHX63AWjAfgL3Q-WnGYbNQ0LYmKAtQJLgamawpyR3z1rbFVhOx0_kKLob13LtXQvfN4r9PVaMkiHTm4PBxyZjF0NqoKZywIsXomhZT--Ti2m2NO5E7snHAKAEfhQZMPlUPoQ9LVFYQhhtobAeNogFmeiQpYOLXuJ12WLN21Hz-fmxHUey_qklFXUjjSi7TnHYTiHT3i7dJlGB7_N_JTOZKqkX-WVY9kYYot5DgJVjdYYJZRcK-lfO2GQnol5ydI0mE02GtnnAOCkXt_6H8qE33K0ZTeropi1HaaYebbc8F_U92xEUG666aP3Np-_I5BlwKLxM1KP0aS4OIRvAEy06OCbj-pCgSBE8xtayyqmhO6zHm9LxNsOLUP8INa8sBIIqYLgiutj9PkaL5Pj65uSo8TeYT41yabf74z5h-zP0bv2W1Cg7Y_ihgkn0U6La8CMV2HQiqQWuaQvpcQZWts5rqBwQeQGDnxzV2X8lOAxS30k._WEcKlQ4Ow6h6ntWfabNn-Jlx3Pe0a7fklBmNMbKspU"

Verify an existing token

Allows the account owner to inspect an access token to see what permissions it has.

If the token is expired will simply return "Token expired".

Request

URL : https://ws-[cloudID].aculabcloud.net/access-token/check-access-token
Methods : GET, POST
Parameter Value Description
api_access_token string The access token to check

Response

For a valid token the return is a JSON object containing information about the access token. , or "Token expired", "Invalid token"

For an expired token the response is a JSON string containing "Token expired".

For anything else the response it a JSON string, "Invalid token"

Parameter Value Description
expiry string (optional) The access token to check
file_prefix string (optional) The file prefix that applies to file access for this token if specified
file_types string (optional) Comma separated list of file types that this token allows access to if any
media_write string (optional) "true" if this token is allowed to modify file, otherwise ommitted
service_name string (optional) The outbound service name this token is allowed to invoke, if specified

Example

Request
https://ws-1-2-0.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6CHjl1mytQe3QuWS7XlLaBWUF6WRxpjdQZx7N3E9tbh7iwdoAb7CfoHZBzaLguR3RfQYekQUWwzCxuqtVKDynDhdY6sFFHOQ64qslwrfCg.Wqi_lpvVUgmo4YkgVKyOW_LvtUeMl7SOD0_8TJJr8vg
Response
{
    "expiry": "2025-09-29_13:25:45",
    "file_prefix": "common",
    "file_types": "media,rest",
    "media_write": "true",
    "service_name": "RegTest_REST_Out"
}

Revoking a token

Allows the account owner to revoke an access token, this is immediate and irrevocable. Once a token has been revoked it cannot be reinstated.

Request

URL : https://ws-[cloudID].aculabcloud.net/access-token/revoke-access-token
Methods : GET, POST
Parameter Value Description
api_access_token string The access token to revoke

Response

A 204 Empty response

Example

Request
https://ws-1-2-0.aculabcloud.net/access-token/revoke-access-token?api_access_token=eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIiwia2lkIjoiOXBsX0RYV1pKbExoY1VueWZoYVh0d2praUtSSlBQQ2lkaUhTR0tMVXd5ZyJ9.UtqahOODhpDytF6TL3_zBh1lHmX6VOceIzpnTAlZvrEdiOzk0ubX01pegyPOxSddB3fn1yHaKx8jyUE2RZAIHxms5cOuizZj6rIax5-klWt2sqdJ7rX1BOlx5H132MVlWtQ83A_ixbIUGoWOmA_95gcDXU2WJWxwx0hDdBAjL-EFuK3ynOnPNSuga6_w-oXsb0egpsjlmaeDelA3Jc2fHcDqfw3crPL5Kl-Movcg0LkfDZ6qeEyXY8cA57W4P_z_huRzJofFhNCURg0XM_J7pUByqSWACOVn1rL6hbkARrZyUo2s9YyE6QUl0vf1n3ztxd8gylodIKlYbRPrIghOhw.UwmPk5bo5nucTyOT78B2Kg.jb5vU_dPAIhDDUgqExPAgCt8d3xTPNhA_JOjsesZLyBRxNqG6Z5ajDhx90hJEE56S8BVytR0QrEfEKhyvuDAYt1eP9vlxOSv2AmoaqhD1ggtGcA7ND8f_LRqa5_oWDUV61ktpxbtIHnDE8OCvoC33ZgW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