> ## Documentation Index
> Fetch the complete documentation index at: https://gnosispay-feat-v2-auth-module.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Access Token

> Verify a signed SIWE message. Returns both a short-lived access token and a longer-lived refresh token in the response body. The client is responsible for storing the refresh token securely.



## OpenAPI

````yaml https://gp-auth-module.prod.gnosispay.com/openapi.json post /auth/siwe
openapi: 3.0.0
info:
  version: 1.0.0
  title: SIWE Authentication API
  description: Sign In With Ethereum authentication service
servers:
  - url: https://gp-auth-module.prod.gnosispay.com
    description: API server
security: []
paths:
  /auth/siwe:
    post:
      tags:
        - Auth
      summary: Get Access Token
      description: >-
        Verify a signed SIWE message. Returns both a short-lived access token
        and a longer-lived refresh token in the response body. The client is
        responsible for storing the refresh token securely.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifySiweRequest'
      responses:
        '200':
          description: Access and refresh tokens issued successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifySiweSuccess'
        '400':
          description: Bad request - SIWE verification failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationOrError'
components:
  schemas:
    VerifySiweRequest:
      type: object
      properties:
        address:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
        signature:
          type: string
        message:
          type: string
          minLength: 1
      required:
        - address
        - signature
        - message
    VerifySiweSuccess:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        accessToken:
          type: string
        refreshToken:
          type: string
      required:
        - success
        - accessToken
        - refreshToken
    ValidationOrError:
      anyOf:
        - $ref: '#/components/schemas/ValidationError'
        - $ref: '#/components/schemas/Error'
    ValidationError:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            name:
              type: string
              enum:
                - ValidationError
            message:
              type: string
          required:
            - name
            - message
      required:
        - success
        - error
    Error:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
      required:
        - success
        - error

````