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

# Exchange a Google ID token for an API session.



## OpenAPI

````yaml /openapi/openapi.yaml post /auth/google
openapi: 3.0.3
info:
  title: Golan Sertifikasi API
  version: 1.0.0
  description: >-
    Public REST API for Golan Sertifikasi web and mobile clients. All monetary
    values are integer IDR. Authenticate with Google ID token exchange; use the
    short-lived bearer token returned by the API.
servers:
  - url: /api/v1
security:
  - bearerAuth: []
paths:
  /auth/google:
    post:
      tags:
        - Identity
      summary: Exchange a Google ID token for an API session.
      operationId: loginWithGoogle
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - id_token
              properties:
                id_token:
                  type: string
                  minLength: 1
                  maxLength: 16384
      responses:
        '200':
          description: Short-lived bearer session. The response is never cached.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '400':
          description: Invalid request.
        '401':
          description: Google credential is invalid or its email is not verified.
        '503':
          description: Google login or application signing is not configured.
      security: []
components:
  schemas:
    Session:
      type: object
      required:
        - access_token
        - token_type
        - expires_in
        - onboarding_required
        - user
      properties:
        access_token:
          type: string
          description: Short-lived API bearer token.
        token_type:
          type: string
          enum:
            - Bearer
        expires_in:
          type: integer
          format: int64
          description: Token lifetime in seconds; currently 900.
        onboarding_required:
          type: boolean
        user:
          $ref: '#/components/schemas/User'
    User:
      type: object
      required:
        - id
        - email
        - avatar_url
        - status
        - profile
        - roles
        - permissions
        - referral_code
      properties:
        id:
          type: string
        email:
          type: string
          format: email
        avatar_url:
          type: string
        status:
          type: string
          enum:
            - active
            - suspended
            - banned
        onboarding_completed_at:
          type: string
          format: date-time
        profile:
          $ref: '#/components/schemas/UserProfile'
        roles:
          type: array
          nullable: true
          items:
            type: string
        permissions:
          type: array
          nullable: true
          items:
            type: string
        referral_code:
          type: string
    UserProfile:
      type: object
      required:
        - display_name
        - legal_name
        - phone
        - acquisition_source
        - category_ids
      properties:
        display_name:
          type: string
        legal_name:
          type: string
        birth_date:
          type: string
          format: date
        gender:
          type: string
          enum:
            - male
            - female
            - prefer_not_to_say
        phone:
          type: string
        acquisition_source:
          type: string
        category_ids:
          type: array
          nullable: true
          items:
            type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.