---
title: "Add callback URI to application"
method: POST
path: "/v3/applications/redirect-uris"
tags: ["Applications"]
---

# Add callback URI to application

`POST /v3/applications/redirect-uris`

Adds a callback URI to the specified Nylas application. Nylas uses callback URIs to redirect users
to your project after they complete the authentication flow. If you don't specify a `platform`,
Nylas defaults to `web`.

The OAuth protocol requires that you include the `client_secret` field for calls made to this
endpoint, depending on the `platform` you define. If you're using
[OAuth 2.0 with PKCE](/docs/v3/auth/hosted-oauth-accesstoken/#create-grants-with-oauth-2.0-and-pkce)
and your platform is `js`, `ios`, `android`, or `desktop`, the `client_secret` field is not
required.

## Request body

- union
  - object
    - `platform` 'web' | 'desktop' — Platform identifier
    - `id` string — The callback URI ID. This must be a universally unique ID (UUID).
    - `url` string, required — Your project's callback URI, including the protocol. Nylas accepts HTTP for localhost development _only_. Otherwise, you need to use HTTPS.
  - object
    - `platform` 'js' — Platform identifier
    - `id` string — The callback URI ID. This must be a universally unique ID (UUID).
    - `url` string, required — Your project's callback URI, including the protocol. Nylas accepts HTTP for localhost development _only_. Otherwise, you must use HTTPS.
    - `settings` object — Additional platform settings and configurations for the Javascript callback URI.
      - `origin` string, required — The `origin` is the base URL from which your project or app is served. It is required because it's a critical part of defining your app's trust boundaries to prevent cross-origin issues. Set this when you set up OAuth redirect URIs and other security settings.
  - object
    - `platform` 'ios' — Platform identifier
    - `id` string — The callback URI ID. This must be a universally unique ID (UUID).
    - `url` string, required — Your project's callback URI. This can be HTTPS or a deeplink (for example, `<package/bundle-name>://<deeplink>`). Nylas accepts HTTP for localhost development _only_. Otherwise, you must use HTTPS.
    - `settings` object — Additional platform settings and configurations for the iOS callback URI.
      - `bundle_id` string, required — The `bundle_id` (Bundle Identifier) is a unique identifier for an iOS app. It's set in the Xcode project and follows a reverse domain name style.
      - `app_store_id` string — Unique identifier for your app on the Apple App Store. This ID is assigned to your app when you submit it to the App Store and it is approved.
      - `team_id` string — Unique identifier for your Apple Developer Account or team.
  - object
    - `platform` 'android' — Platform identifier
    - `id` string — The callback URI ID. This must be a universally unique ID (UUID).
    - `url` string, required — Your project's callback URI. This can be HTTPS or a deeplink (for example, `<package/bundle-name>://<deeplink>`). Nylas accepts HTTP for localhost development _only_. Otherwise, you must use HTTPS.
    - `settings` object — Additional platform settings and configurations for the Android callback URI.
      - `package_name` string, required — Find your app's Package Name in the Android Manifest. It's a unique identifier that distinguishes your app on the Google Play Store and on the device. It follows a reverse domain name notation, such as `com.example.myapp`.
      - `sha1_certificate_fingerprint` string, required — A SHA-1 hash of the app's signing certificate. This ensures that only the _signed_ version of your app can use the redirect URI.

## Response `200`

Returns callback URI

- object
  - `request_id` string — ID of the request
  - `data` union
    - WebDesktopCallbackNoSettings
      - `platform` 'web' | 'desktop' — Platform identifier
      - `id` string — The callback URI ID. This must be a universally unique ID (UUID).
      - `url` string — Your project's callback URI, including the protocol. Nylas accepts HTTP for localhost development _only_. Otherwise, you need to use HTTPS.
    - JsCallbackwSettings
      - `platform` 'js' — Platform identifier
      - `id` string — The callback URI ID. This must be a universally unique ID (UUID).
      - `url` string — Your project's callback URI, including the protocol. Nylas accepts HTTP for localhost development _only_. Otherwise, you must use HTTPS.
      - `settings` object — Additional platform settings and configurations for the Javascript callback URI.
        - `origin` string, required — The `origin` is the base URL from which your project or app is served. It is required because it's a critical part of defining your app's trust boundaries to prevent cross-origin issues. Set this when you set up OAuth redirect URIs and other security settings.
    - IosCallbackwSettings
      - `platform` 'ios' — Platform identifier
      - `id` string — The callback URI ID. This must be a universally unique ID (UUID).
      - `url` string — Your project's callback URI. This can be HTTPS or a deeplink (for example, `<package/bundle-name>://<deeplink>`). Nylas accepts HTTP for localhost development _only_. Otherwise, you must use HTTPS.
      - `settings` object — Additional platform settings and configurations for the iOS callback URI.
        - `bundle_id` string, required — The `bundle_id` (Bundle Identifier) is a unique identifier for an iOS app. It's set in the Xcode project and follows a reverse domain name style.
        - `app_store_id` string — Unique identifier for your app on the Apple App Store. This ID is assigned to your app when you submit it to the App Store and it is approved.
        - `team_id` string — Unique identifier for your Apple Developer Account or team.
    - AndroidCallbackwSettings
      - `platform` 'android' — Platform identifier
      - `id` string — The callback URI ID. This must be a universally unique ID (UUID).
      - `url` string — Your project's callback URI. This can be HTTPS or a deeplink (for example, `<package/bundle-name>://<deeplink>`). Nylas accepts HTTP for localhost development _only_. Otherwise, you must use HTTPS.
      - `settings` object — Additional platform settings and configurations for the Android callback URI.
        - `package_name` string, required — Find your app's Package Name in the Android Manifest. It's a unique identifier that distinguishes your app on the Google Play Store and on the device. It follows a reverse domain name notation, such as `com.example.myapp`.
        - `sha1_certificate_fingerprint` string, required — A SHA-1 hash of the app's signing certificate. This ensures that only the _signed_ version of your app can use the redirect URI.

## Other responses

- `400` — Bad Request
- `401` — Not Authenticated

---

[API](https://skmtc.dev/nylas/apis/nylas-api.md) · [All operations](https://skmtc.dev/nylas/apis/nylas-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nylas/nylas-api/revisions/51c2c1b4ecff/schema)
