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

# 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 `app_editor_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 app editor 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, and each workspace API key has its own. Some workspaces have a different limit.

<Note>This endpoint accepts a personal access token or a workspace API key for the app's workspace, including a read-only one, or a signed-in session.</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 `app_editor_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 app editor 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, and each workspace API key has its own. Some
        workspaces have a different limit.


        <Note>This endpoint accepts a personal access token or a workspace API
        key for the app's workspace, including a read-only one, or a signed-in
        session.</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.
        '503':
          description: >-
            Database temporarily unavailable (`database_unavailable`): the data
            cluster did not answer in time. Retry after the `Retry-After`
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
              examples:
                database_unavailable:
                  summary: database_unavailable
                  value:
                    error:
                      code: database_unavailable
                      message: Database temporarily unavailable, please retry
                      details: {}
      security:
        - PersonalAccessTokenAuth:
            - read_only
        - WorkspaceApiKeyAuth:
            - read_only
        - WorkspaceApiKeyBearerAuth:
            - read_only
components:
  schemas:
    AppRedirectURIsResponse:
      properties:
        app_editor_redirect_uri:
          type: string
          title: App Editor Redirect Uri
          description: >-
            Redirect URI for connections made in the app editor while the app is
            being built.
          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:
        - app_editor_redirect_uri
        - app_redirect_uris
      title: AppRedirectURIsResponse
      description: >-
        The redirect URIs to register in a workspace connector's own OAuth app
        for this app.
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    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.
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token, sent as `Authorization: Bearer <token>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: >-
        Workspace API key, sent as `api_key: <key>`. Each operation that accepts
        one lists what the key needs: a permission, `read_only` or
        `full_access`, like a personal access token, or a scope. A key without
        the scope gets 403 `workspace_api_key_scope_required`.
    WorkspaceApiKeyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace API key, sent as `Authorization: Bearer <key>`. Accepted
        wherever `api_key` is, with the same permission.

````

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