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

# Get OAuth access token

> Retrieve the access token captured for a previously issued sign-in URL, identified by its state value.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/connections/AccessToken/{state}
openapi: 3.0.0
info:
  title: Engini DeveloperAPI
  version: v1
  description: 'Merged public developer API spec: Identity + WorkflowApi.'
servers:
  - url: https://api.engini.io
security:
  - Bearer: []
  - ApiKey: []
paths:
  /v1/connections/AccessToken/{state}:
    get:
      tags:
        - Connections
      summary: Get OAuth access token
      description: >-
        Retrieve the access token captured for a previously issued sign-in URL,
        identified by its state value.
      operationId: Connections_GetAccessToken
      parameters:
        - name: state
          in: path
          required: true
          description: The state value returned when the sign-in URL was generated.
          schema:
            type: string
          x-position: 1
      responses:
        '200':
          description: >-
            The access token data for the state, or null if no token has been
            captured yet.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessTokenResponse'
        '400':
          description: Bad request — malformed body or invalid parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized — missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden — the caller lacks access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found — the resource does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests — rate limit exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error — an unexpected error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - Bearer: []
        - ApiKey: []
components:
  schemas:
    AccessTokenResponse:
      type: object
      additionalProperties: false
      required:
        - status
        - tokenData
        - connectionData
      properties:
        status:
          type: string
        error_message:
          type: string
          nullable: true
        tokenData:
          type: object
          additionalProperties: {}
        connectionData:
          type: object
          additionalProperties: {}
    ErrorResponse:
      type: object
      description: >-
        Unified error envelope for every non-200 response from
        /api/DeveloperAPI/v1/*.

        See applications-tools-spec.md §"Error envelope".
      additionalProperties: false
      required:
        - errorCode
        - message
        - requestId
        - timestamp
        - path
      properties:
        errorCode:
          type: string
          description: Machine-readable error code identifying the failure.
        message:
          type: string
          description: Human-readable error message.
        requestId:
          type: string
          description: Identifier of the request, for support/correlation.
        timestamp:
          type: string
          description: Timestamp when the error occurred (ISO 8601).
        path:
          type: string
          description: Request path that produced the error.
        details:
          type: array
          description: Per-field validation details, when applicable.
          nullable: true
          items:
            $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      description: A single field-level error detail within an ErrorResponse.
      additionalProperties: false
      required:
        - field
        - issue
      properties:
        field:
          type: string
          description: Name of the field the issue relates to.
        issue:
          type: string
          description: Description of the issue with the field.
  securitySchemes:
    Bearer:
      type: http
      description: Enter your JWT token
      scheme: bearer
      bearerFormat: JWT
    ApiKey:
      type: apiKey
      description: >-
        Opaque Developer API key (prefix `eng_`). Authenticates as the key's
        owner and resolves the account automatically — no Bearer or companytoken
        needed.
      name: x-api-key
      in: header

````