---
title: "Authentication API"
url: "https://docs.unified.to/auth/overview"
description: "API reference for Authentication API. Launch multiple pre-built Authentication integrations today with zero maintenance — all through a single API."
generated_at: "2026-06-04T00:12:35.912Z"
---
# Authentication API

Allow your application to sign-in your users with an OAuth2 integration. There are two ways to use the authentication APIs:

* Redirect your user to the [Login endpoint](/auth/login/Sign%5Fin%5Fa%5Fuser) with a specific `integration_type` and your `workspace_id`
* Call the [Integrations API endpoint](/unified/integration/Returns%5Fall%5Factivated%5Fintegrations%5Fin%5Fa%5Fworkspace) with `categories=auth` to get a list of authentication integrations and use the `oauthUrl` field in each object to redirect your user

Authentication-only integrations should not be used to create connections. They are intended to sign in your users. If you're trying to authorize your customers and create connections on your own, refer to our tutorial: [Customize your authorization flow with the Unified API](/tutorials/customize-auth-flow).

## [Instructions](#instructions)

### [1\. Activate authentication integrations](#%5F1-activate-authentication-integrations)

Go to <https://app.unified.to/integrations?tab=auth> and activate integrations that you would like to have your users sign-in to your application with

### [2\. Display Sign-in links to your users](#%5F2-display-sign-in-links-to-your-users)

### [2.1\. Use our embedded Embedded Sign-in widget](#%5F21-use-our-embedded-embedded-sign-in-widget)

Go to [https://app.unified.to/settings/embed](https://app.unified.to/settings/embed?tab=Sign-in) and configure our embedded sign-in widget.

### [2.2\. Use our getActivatedIntegrations API](#%5F22-use-our-getactivatedintegrations-api)

Call the [getActivatedIntegrations](https://docs.unified.to/unified/integration/Returns%5Fall%5Factivated%5Fintegrations%5Fin%5Fa%5Fworkspace) API endpoint to retrieve a list of activated authentication integrations `categories=auth`.

```
[
    {
        logo_url: 'https://api.unified.to/docs/images/google.png',
        name: 'Google',
        type: 'google',
        oauthUrl: 'https://....',
    },
];

```

The Sign-in URL can have the following optional parameters:

|                   |                                                                                                                                                        |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| redirect=true     | redirect the user or if empty, will return the URL as string in its response                                                                           |
| success\_redirect | the URL that the user will be redirected to once they have successfully authenticated with that integration vendor                                     |
| failure\_redirect | the URL that the user will be redirected to if there is an error or other issue preventing the user from being authenticated by the integration vendor |
| state             | a string that will be sent back to the success\_redirect. You can use this to remember a user ID or other identifier.                                  |

### [3\. Verify the login](#%5F3-verify-the-login)

Once the user successfully signs-in, they are redirected back to your application (or to the location of the `success_redirect` URL parameter from step 2).

A `jwt` parameter will be appended to that URL. The `jwt` is a base64 encoded [JWT](https://jwt.io/) and is signed with your Workspace Secret found at <https://app.unified.to/settings/api>.

Verify the JWT with your workspace secret on your server (NOT in your browser as the workspace secret is not public).

Example code to verify a JWT on a NodeJS server:

```
try {
    let result = JWT.verify(req.payload.jwt, workspace.secret);
} catch (err) {
    console.error(err);
}

```

The decoded JWT will contain `name` and `emails` field:

```
{
    "name": "Jane Smith",
    "emails": ["jane@foo.com", "jsmith89@gmail.com"]
}

```

Use the emails to log the user into your application as it is verified by the integration.

[![Run In Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/16228585-f6e189b9-b71c-4a09-8a47-f6763f9c24dc?action=collection%2Ffork&source=rip%5Fmarkdown&collection-url=entityId%3D16228585-f6e189b9-b71c-4a09-8a47-f6763f9c24dc%26entityType%3Dcollection%26workspaceId%3D0a62ef4e-9382-41f4-8a59-44c03de1e0d5)
