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

# Oauth Authorize



## OpenAPI

````yaml /openapi/mio-openapi.json get /oauth/authorize
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /oauth/authorize:
    get:
      tags:
        - oauth
      summary: Oauth Authorize
      operationId: oauth.get_oauth_get_oauth_authorize
      parameters:
        - in: query
          name: response_type
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Response Type
        - in: query
          name: client_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Client Id
        - in: query
          name: redirect_uri
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Redirect Uri
        - in: query
          name: scope
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Scope
        - in: query
          name: state
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: State
        - in: query
          name: nonce
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Nonce
        - in: query
          name: code_challenge
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Code Challenge
        - in: query
          name: code_challenge_method
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Code Challenge Method
        - in: query
          name: prompt
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Prompt
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/_ConsentRequiredResponse'
          description: Consent required — frontend must render the consent screen
        '302':
          description: Error response; see `errors[0].code` where present.
        '400':
          description: OAuth error (unvalidated redirect_uri or missing client_id)
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    _ConsentRequiredResponse:
      description: >-
        Returned when the contact must approve consent before a code is issued.


        ``consent_request_id`` is an OPAQUE handle to the SERVER-SIDE
        pending-authorize

        context (held in Valkey, single-use, 5-min TTL).  It carries no bound
        params —

        redirect_uri / scope binding / PKCE / contact all stay server-side — so
        the

        client cannot forge or tamper with them.  The frontend renders the
        branded

        consent screen from the display fields and POSTs the consent_request_id
        back.
      properties:
        brand_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Brand Label
        client_name:
          title: Client Name
          type: string
        consent_request_id:
          title: Consent Request Id
          type: string
        consent_required:
          default: true
          title: Consent Required
          type: boolean
        logo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Logo Url
        scope:
          items:
            type: string
          title: Scope
          type: array
      required:
        - consent_request_id
        - client_name
        - scope
      title: _ConsentRequiredResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````