godo.ADS.CreateToken()
Generated on 23 Nov 2026
from godo version
v1.245.0
Usage
client.ADS.CreateToken(ctx context.Context, create *godo.ADSTokenCreateRequest) (*godo.ADSTokenCreateResponse, *godo.Response, error)Description
CreateToken creates a token. Region comes from create and is used as the path segment.
Parameters
create*godo.ADSTokenCreateRequest required
Fields of godo.ADSTokenCreateRequest
ADSTokenCreateRequest is the body for CreateToken.
Region is required. The other fields are optional and omitted when empty.
WorkspaceUUIDs is the workspace binding list.
ExpiresInSeconds is written as a JSON string. Zero means the server default and is omitted.
RegionstringPurposegodo.ADSTokenPurposeWorkspaceUUIDs[]stringNamestringExpiresInSecondsint64Permissions[]string
Returns
- *godo.ADSTokenCreateResponse
- *godo.Response
The HTTP response, with pagination
Links,Meta, andRatelimit information.- error
Non-nil when the request fails. API errors are returned as
*godo.ErrorResponse.
Fields of godo.ADSTokenCreateResponse
ADSTokenCreateResponse is the body returned by CreateToken.
AccessToken is returned once, on create. Do not log this struct with %v or %+v.
IDstringNamestringAccessTokenstringExpiresAtstring
Request Sample
More Information
See the Go package documentation for the source of this method.