> ## Documentation Index
> Fetch the complete documentation index at: https://docs.go.gbgplc.com/llms.txt
> Use this file to discover all available pages before exploring further.

> Generate an OAuth2 access token by exchanging your GBG GO API client credentials, required for all subsequent API calls.

# Generate access token



## OpenAPI

````yaml docs/go-v2/openapi-v2.json POST /as/token.oauth2
openapi: 3.0.4
info:
  title: GBG GO API Reference V2
  description: >-
    The GBG GO V2 API enables authentication, customer journey execution, task
    management, and tracking verification progress.
  version: 2.0.0
  license:
    name: MIT
servers:
  - url: https://eu.platform.go.gbgplc.com/v2/captain/
  - url: https://us.platform.go.gbgplc.com/v2/captain/
  - url: https://au.platform.go.gbgplc.com/v2/captain/
  - url: https://api.auth.gbgplc.com/as/token.oauth2
security:
  - bearerAuth: []
paths:
  /as/token.oauth2:
    post:
      tags:
        - Journey execution
      summary: Generate access token
      description: >-
        Get an access token to authenticate API requests. If you're unfamiliar
        with the authentication process, check out the [authentication
        guide](/docs/go-v2/developer-integration/execute-customer-journeys/authenticate)
        for more details.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                client_id:
                  type: string
                  description: The client ID assigned to your organization.
                client_secret:
                  type: string
                  description: The client secret assigned to your organization.
                username:
                  type: string
                  description: The username for API authentication.
                password:
                  type: string
                  description: The password for API authentication.
                grant_type:
                  type: string
                  enum:
                    - password
                  description: Must always be set to 'password'.
              required:
                - client_id
                - client_secret
                - username
                - password
                - grant_type
      responses:
        '200':
          description: Successfully retrieved access token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    description: The access token used for authentication.
                  expires_in:
                    type: integer
                    description: Token expiration time in seconds.
                  token_type:
                    type: string
                    description: The type of token, usually 'Bearer'.
        '400':
          description: Invalid request. Check your credentials.
        '401':
          description: Unauthorized request. Invalid username or password.
      servers:
        - url: https://api.auth.gbgplc.com
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````