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

# Exchange Google OAuth2 code for tokens

> Exchanges a Google authentication code for a submission token and user info



## OpenAPI

````yaml POST /auth/google/exchange
openapi: 3.0.3
info:
  title: UAG Work-Based Learning API
  description: >-
    API for managing work-based learning submissions, authentication, and
    verification
  version: 1.0.0
servers:
  - url: https://wbl.monolisk.dev
    description: Production server
  - url: http://localhost:8787
    description: Development server
security: []
tags:
  - name: Authentication
    description: Authentication and user information endpoints
  - name: Submissions
    description: Work experience submission management
  - name: Verification
    description: Supervisor verification task management
paths:
  /auth/google/exchange:
    post:
      tags:
        - Authentication
      summary: Exchange Google auth code for submission token
      description: >-
        Exchanges a Google authentication code for a submission token and user
        info
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: Google authentication code
              required:
                - token
      responses:
        '200':
          description: Successfully exchanged auth code
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: Submission token
                  info:
                    $ref: '#/components/schemas/UserInfo'
        '400':
          description: Missing token or invalid request
        '403':
          description: User already made a submission this week
components:
  schemas:
    UserInfo:
      type: object
      properties:
        firstname:
          type: string
        lastname:
          type: string
        osis:
          type: string
        grade:
          type: string
        email:
          type: string
          format: email
        hours:
          type: integer
      required:
        - firstname
        - lastname
        - osis
        - grade
        - email
        - hours

````