Python
from gcore import Gcore client = Gcore( api_key="My API Key", ) api_token_create = client.iam.api_tokens.create( client_id=0, client_user={}, exp_date="2021-01-01 12:00:00+00:00", name="My token", ) print(api_token_create.token)
{ "token": "<string>" }
Create an API token in the current account.
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef
apikey
apikey 1234$abcdef
Account ID.
OK.
The response is of type object.
object
Was this page helpful?