Skip to main content

Create a user token

post/v1/temporal_tokens
Deprecated
It may be replaced or removed in future versions of the API.

Request​

Authorization

  • Authorizationstringheaderrequired

    Key in the format Bearer <API-key>. Create a key on the API keys page.

Request body

    allow_httpboolean

    Allows creating HTTP tunnels

    allow_tcpboolean

    Allows creating TCP tunnels

    descriptionstringrequired

    Description

    Example: CI deploy token
    domainsstring[]

    Reserved domains: if bindings are set, a tunnel can only be started on them and on the endpoints from endpoints

    Example: ["demo-app.tuna.am"]
    durationstring

    Lifetime

    Example: 24h
    endpointsstring[]

    Aliases of reserved endpoints: if bindings are set, a tunnel can only be started on them and on the domains from domains

    Example: ["postgres"]
    limit_by_active_tunnelsinteger<int64>

    Limit on the number of active tunnels

    Example: 10
    limit_by_created_tunnelsinteger<int64>

    Limit on the total number of created tunnels

    Example: 100

Response

    allow_httpboolean

    Allows creating HTTP tunnels

    allow_tcpboolean

    Allows creating TCP tunnels

    created_atstring<date-time>

    Creation date

    descriptionstring

    Description

    Example: CI deploy token
    domainsstring[]

    Reserved domains that tunnels are allowed on

    Example: ["demo-app.tuna.am"]
    endpointsstring[]

    Aliases of reserved endpoints that tunnels are allowed on

    Example: ["postgres"]
    expired_atstring<date-time>

    Expiration date

    idinteger<int64>

    Token ID

    Example: 42
    last_used_atstring<date-time>

    Last used date

    limit_by_active_tunnelsinteger<int64>

    Limit on the number of active tunnels

    Example: 10
    limit_by_created_tunnelsinteger<int64>

    Limit on the total number of created tunnels

    Example: 100
    provisioned_bystring

    What created or modified the object: terraform means the Terraform provider, empty means another client

    service_namestring

    Name of the service the token was issued for by tuna service install

    Example: my-service
    tokenstring

    Token

    Example: 2dBvKpR7Wm2vXtL8Hc6sFjY3bQe