> ## 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.

# Sign In

> Authenticates a user by verifying the signed message from their wallet. Returns a JWT access token upon successful verification.



## OpenAPI

````yaml /apis/portal/openapi.json post /api/v2/{portalId}/auth/signin
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}/auth/signin:
    post:
      tags:
        - Auth
      summary: Sign In
      description: >-
        Authenticates a user by verifying the signed message from their wallet.
        Returns a JWT access token upon successful verification.
      parameters:
        - name: portalId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: unique portal id (provided by Magna)
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                wallet:
                  type: string
                  description: wallet address to login with
                platform:
                  type: string
                  enum:
                    - EVM
                    - MOVE
                    - SOLANA
                    - OTHER
                message:
                  type: string
                  description: message that was signed
                signature:
                  type: string
                  description: signed message from the wallet owner
              required:
                - wallet
                - platform
                - message
                - signature
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  accessToken:
                    type: string
                    description: JWT access token for authenticated requests
                  expiration:
                    type: string
                    format: date-time
                    description: access token expiration date
                  submissionInfo:
                    type: object
                    properties:
                      claimWallet:
                        type: string
                        nullable: true
                        description: the wallet address used for claiming
                      submitted:
                        type: boolean
                        description: whether the submission was confirmed
                      pohPassed:
                        type: boolean
                        nullable: true
                        description: whether the proof of humanity check was passed
                      accounts:
                        type: array
                        items:
                          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
                        description: list of eligible account values
                    required:
                      - claimWallet
                      - submitted
                      - pohPassed
                      - accounts
                    nullable: true
                required:
                  - accessToken
                  - expiration
                  - submissionInfo
                description: Ok
                title: SignIn
                example:
                  accessToken: >-
                    eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwid2FsbGV0IjoiMHhmMzlmZDZlNTFhYWQ4OGY2ZjRjZTZhYjg4MjcyNzljZmZmYjkyMjY2IiwiaWF0IjoxNTE2MjM5MDIyfQ.-fu_kTkRsmXqWwwrmsSgb78S504bkkZXp_e92RaJTw0
                  expiration: '2024-12-31T23:59:59.000Z'
        '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
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: error message
                required:
                  - error
                description: Unauthorized
                example:
                  error: Invalid signature
        '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

````