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

# OAuth Verification

> Verifies the OAuth flow for a given provider to associate with an airdrop participant.



## OpenAPI

````yaml /apis/portal/openapi.json post /api/v2/{portalId}/submission/oauth/{provider}/verify
openapi: 3.0.2
info:
  title: Magna Portal API
  version: 1.0.0
servers: []
security: []
tags:
  - name: Auth
    description: Authentication related endpoints
  - name: Token
    description: Token claiming
  - name: Config
    description: Portal configuration
  - name: Misc
    description: Miscellaneous operational endpoints
  - name: Staking
    description: Staking pool operations
  - name: Compliance
    description: Wallet compliance operations
paths:
  /api/v2/{portalId}/submission/oauth/{provider}/verify:
    post:
      tags:
        - Submission
      summary: OAuth Verification
      description: >-
        Verifies the OAuth flow for a given provider to associate with an
        airdrop participant.
      parameters:
        - name: portalId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: unique portal id (provided by Magna)
        - name: provider
          in: path
          required: true
          schema:
            type: string
          description: OAuth provider
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                authorizationCode:
                  type: string
                  description: OAuth authorization code
                state:
                  type: string
                  description: OAuth state parameter
                codeVerifier:
                  type: string
                  description: code verifier for PKCE flow
              required:
                - authorizationCode
                - state
                - codeVerifier
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  account:
                    type: object
                    properties:
                      value:
                        type: string
                        description: eligible account value
                      type:
                        type: string
                        enum:
                          - EMAIL
                          - X_HANDLE
                          - WALLET
                          - DISCORD
                        description: eligible account type
                      isEligible:
                        type: boolean
                        description: whether the account is eligible
                      description:
                        type: string
                        nullable: true
                        description: optional description for the account eligibility
                    required:
                      - value
                      - type
                      - isEligible
                      - description
                required:
                  - account
        '400':
          description: Client Error
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            message:
                              type: string
                          required:
                            - path
                            - message
                    required:
                      - errors
                  - type: object
                    properties:
                      error:
                        oneOf:
                          - type: string
                            enum:
                              - DISTRIBUTION_NOT_FOUND
                              - HUMANITY_CHECK_INCOMPLETE
                              - DISTRIBUTION_NOT_STARTED
                              - STAKING_POOL_NOT_FOUND
                              - STAKE_NOT_FOUND
                          - type: string
                    required:
                      - error
                description: Client Error
                example:
                  errors:
                    - path: query.wallet
                      message: Required
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: error message
                required:
                  - error
                description: Server Error
                example:
                  error: internal server error

````