api.token()

.token(): Promise<string>

Get an access token. Note that this value is cached per API instance. It need only be obtained from the CloudTables servers once.

Parameters

  • N/A

Returns

This method returns a Promise which will resolve to a string which contains the access token to be used with the <script> tag to access a data set.

Example

const api = new CloudTablesApi('sub-domain', ':apiKey');

let token = await api.token();

Will result in a string such as:

ANnbgUJoKO8qh5fYObpffdNqqgANtVVL