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

> ## Agent Instructions
> Internal links on these pages omit the .md extension. Append .md to a docs page URL, or send an Accept: text/markdown header, to get that page as markdown.

# Get OAuth redirect URIs

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Returns the redirect URIs to register in the provider's console for a workspace connector that uses your own OAuth app, so its connections from this app can complete.

Which ones you need depends on the connector's `uses_oauth_gateway` in [List workspace connectors](/api-reference/list-workspace-connectors):
- `true`: register `gateway_redirect_uri` only. It stays the same for every app.
- `false`: register `builder_redirect_uri` and every `uri` in `app_redirect_uris`. The list grows when the app gets a new custom domain, so register the new host's URI too.

Connectors that run on Base44's OAuth app need none of these. Anyone who can open the app in the builder can call this, including viewers.

This is limited to 120 requests per minute per caller. A signed-in session has its own limit, and every personal access token for the workspace shares one. Some workspaces have a different limit.

<Note>This endpoint accepts a personal access token for the app's workspace, including a read-only token, or a signed-in session. Workspace API keys are not accepted.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json get /api/apps/{app_id}/oauth-redirect-uris
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/oauth-redirect-uris:
    get:
      summary: Get OAuth redirect URIs
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Returns the redirect URIs to register in the provider's console for a
        workspace connector that uses your own OAuth app, so its connections
        from this app can complete.


        Which ones you need depends on the connector's `uses_oauth_gateway` in
        [List workspace connectors](/api-reference/list-workspace-connectors):

        - `true`: register `gateway_redirect_uri` only. It stays the same for
        every app.

        - `false`: register `builder_redirect_uri` and every `uri` in
        `app_redirect_uris`. The list grows when the app gets a new custom
        domain, so register the new host's URI too.


        Connectors that run on Base44's OAuth app need none of these. Anyone who
        can open the app in the builder can call this, including viewers.


        This is limited to 120 requests per minute per caller. A signed-in
        session has its own limit, and every personal access token for the
        workspace shares one. Some workspaces have a different limit.


        <Note>This endpoint accepts a personal access token for the app's
        workspace, including a read-only token, or a signed-in session.
        Workspace API keys are not accepted.</Note>
      operationId: get_app_redirect_uris_api_apps__app_id__oauth_redirect_uris_get
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app to get redirect URIs for.
            title: App Id
          description: ID of the app to get redirect URIs for.
          example: 6820f3a4e7b91d003c45a1f2
      responses:
        '200':
          description: The redirect URIs for the app.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppRedirectURIsResponse'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: You can't open this app in the builder.
        '404':
          description: >-
            App not found, or your token is for a different workspace or doesn't
            include the app.
        '409':
          description: The app's workspace requires an unlocked SSO session.
        '429':
          description: Rate limit reached. Retry later.
components:
  schemas:
    AppRedirectURIsResponse:
      properties:
        builder_redirect_uri:
          type: string
          title: Builder Redirect Uri
          description: Redirect URI for connections made while building the app in Base44.
          example: https://app.base44.com/api/external-auth/callback
        app_redirect_uris:
          items:
            $ref: '#/components/schemas/RedirectURI'
          type: array
          title: App Redirect Uris
          description: >-
            Redirect URIs for connections the app's users make in the published
            app, one for each host it serves on: Base44 hosts first, then custom
            domains, each sorted by host. Empty for an app that has no name yet.
          example:
            - host: acme-crm.base44.app
              is_custom_domain: false
              uri: https://acme-crm.base44.app/api/external-auth/callback
            - host: crm.acme.com
              is_custom_domain: true
              uri: https://crm.acme.com/api/external-auth/callback
        gateway_redirect_uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Gateway Redirect Uri
          description: >-
            Single redirect URI that covers every host, for workspace connectors
            that use the gateway callback. Left out when the gateway callback
            isn't available to you.
          example: https://connectors.base44.com/api/oauth/callback
      type: object
      required:
        - builder_redirect_uri
        - app_redirect_uris
      title: AppRedirectURIsResponse
      description: >-
        The redirect URIs to register in a workspace connector's own OAuth app
        for this app.
    RedirectURI:
      properties:
        host:
          type: string
          title: Host
          description: Host the app serves on.
          example: acme-crm.base44.app
        uri:
          type: string
          title: Uri
          description: Redirect URI to register for this host.
          example: https://acme-crm.base44.app/api/external-auth/callback
        is_custom_domain:
          type: boolean
          title: Is Custom Domain
          description: >-
            Whether the host is one of the app's custom domains (`true`) or a
            Base44 host (`false`).
          example: false
      type: object
      required:
        - host
        - uri
        - is_custom_domain
      title: RedirectURI
      description: A host the app's OAuth callback can return to.
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````

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