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

# callback

> Provides the authentication token for the OpenID Connect authentication process. The authorization server redirects to callback path after successful authentication.

This endpoint receives the authorization code from the OpenID provider and exchanges it for a token. The provider redirects the user to the application callback URL specified in the initial authentication request.

The client application should not call this endpoint directly. The OpenID provider automatically calls this endpoint in the authentication process.



## OpenAPI

````yaml /openapi/generated-api-methods.json GET /v1/callback
openapi: 3.1.0
info:
  title: Generated API methods
  version: 1.0.0
  description: Generated from imported ApiMethodV2 blocks.
servers:
  - url: https://{sql_node}
    variables:
      sql_node:
        default: sql_node
  - url: http://oc1-lts0:9090
security: []
paths:
  /v1/callback:
    get:
      tags:
        - Ocient HTTP Query API
      summary: callback
      description: >-
        Provides the authentication token for the OpenID Connect authentication
        process. The authorization server redirects to callback path after
        successful authentication.


        This endpoint receives the authorization code from the OpenID provider
        and exchanges it for a token. The provider redirects the user to the
        application callback URL specified in the initial authentication
        request.


        The client application should not call this endpoint directly. The
        OpenID provider automatically calls this endpoint in the authentication
        process.
      operationId: getOcientHttpQueryApiCallback
      parameters:
        - name: code
          in: query
          required: true
          description: >-
            The authorization code from the OpenID provider. This endpoint
            exchanges the code for a token.


            Example: code=4/P7q7W91a-oMsCeLvIaQm6bTrgtp7
          schema:
            type: string
        - name: state
          in: query
          required: true
          description: >-
            Prevents cross-site request forgery attacks. This value should match
            the state in the initial authentication request.


            Example: state=fRJfv29f3v39Jf39dJf93jf
          schema:
            type: string
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      reason:
                        type: string
                      sql_state:
                        type: string
                      vendor_code:
                        type: integer
              examples:
                response:
                  value:
                    status:
                      reason: Query executed successfully
                      sql_state: '00000'
                      vendor_code: 0
      servers:
        - url: https://{sql_node}
          variables:
            sql_node:
              default: sql_node
      x-codeSamples:
        - lang: curl
          label: curl
          source: >
            curl -X GET
            "https://my_sql_node.com/v1/callback?code=4/P7q7W91a-oMsCeLvIaQm6bTrgtp7&state=fRJfv29f3v39Jf39dJf93jf"

````