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

# Redeem Launch Token

> Redeem a launch token once. Authenticate with the app's client id and secret (Basic).

Returns who launched the app and a session lifetime of at most 5 minutes; renewing
needs a fresh token from the hub, which re-checks eligibility.



## OpenAPI

````yaml /openapi/mio-openapi.json post /api/v1/apps/v1/launch/redeem
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:
  /api/v1/apps/v1/launch/redeem:
    post:
      tags:
        - embedded-apps
      summary: Redeem Launch Token
      description: >-
        Redeem a launch token once. Authenticate with the app's client id and
        secret (Basic).


        Returns who launched the app and a session lifetime of at most 5
        minutes; renewing

        needs a fresh token from the hub, which re-checks eligibility.
      operationId: embedded_apps.post_embedded_apps_post_apps_v1_launch_redeem
      parameters:
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/LaunchRedeemEnvelope'
                - $ref: '#/components/schemas/LaunchRedeemRequest'
              title: Raw
        required: true
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiResponse_LaunchSessionAttributes_'
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    LaunchRedeemEnvelope:
      additionalProperties: false
      description: >-
        JSON:API form of the redeem body: ``{"data": {"type", "attributes":
        {...}}}``.
      properties:
        data:
          $ref: '#/components/schemas/LaunchRedeemResource'
      required:
        - data
      title: LaunchRedeemEnvelope
      type: object
    LaunchRedeemRequest:
      additionalProperties: false
      description: >-
        Redeem a launch token. The challenge must be the one the token was
        minted against.
      properties:
        challenge:
          pattern: ^[A-Za-z0-9_-]{43,128}$
          title: Challenge
          type: string
        token:
          maxLength: 4096
          minLength: 1
          title: Token
          type: string
      required:
        - token
        - challenge
      title: LaunchRedeemRequest
      type: object
    JsonApiResponse_LaunchSessionAttributes_:
      properties:
        data:
          $ref: '#/components/schemas/JsonApiResource_LaunchSessionAttributes_'
        included:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Included
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - data
      title: JsonApiResponse[LaunchSessionAttributes]
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    LaunchRedeemResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/LaunchRedeemRequest'
        type:
          const: embedded_app_launch_sessions
          title: Type
          type: string
      required:
        - type
        - attributes
      title: LaunchRedeemResource
      type: object
    JsonApiResource_LaunchSessionAttributes_:
      properties:
        attributes:
          $ref: '#/components/schemas/LaunchSessionAttributes'
        id:
          title: Id
          type: string
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        relationships:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Relationships
        type:
          title: Type
          type: string
      required:
        - id
        - type
        - attributes
      title: JsonApiResource[LaunchSessionAttributes]
      type: object
    JsonApiLinks:
      properties:
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiLinks
      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
    LaunchSessionAttributes:
      description: >-
        Who launched the app: ``contact_id`` is the member, scoped to this hub
        and install.
      properties:
        contact_id:
          title: Contact Id
          type: string
        hub_id:
          title: Hub Id
          type: string
        install_id:
          title: Install Id
          type: string
        session_ttl:
          title: Session Ttl
          type: integer
      required:
        - contact_id
        - hub_id
        - install_id
        - session_ttl
      title: LaunchSessionAttributes
      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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.