@textile/hub > Buckets > setToken
Buckets.setToken() method
Obtain a token for interacting with the remote API. When your app is creating new private-key based users to interact with the API using User Group keys, you must first create a new token for each new user. Tokens do not change after you create them.
Signature:
setToken(token: string): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
token | string |
Returns:
Promise<void>