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

# Authenticating embedded users

export const Alert = ({type, title, children}) => {
  const getIcon = () => {
    switch (type) {
      case 'info':
        return "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0zm0 15c-.552 0-1-.448-1-1s.448-1 1-1 1 .448 1 1-.448 1-1 1zm1-3H9V6h2v6z' fill='%230099FF'/%3E%3C/svg%3E";
      case 'success':
        return "data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0zm4.293 6.293L9 11.586 5.707 8.293c-.391-.391-1.024-.391-1.414 0s-.391 1.024 0 1.414l4 4c.391.391 1.024.391 1.414 0l6-6c.391-.391.391-1.024 0-1.414s-1.024-.391-1.414 0z' fill='%230CC26D'/%3E%3C/svg%3E";
      case 'warning':
        return "data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHhtbDpzcGFjZT0ncHJlc2VydmUnIHdpZHRoPScxMDgwJyBoZWlnaHQ9JzEwODAnPjxyZWN0IHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnIGZpbGw9J3RyYW5zcGFyZW50Jy8+PHBhdGggZD0nTTEzLjc5NCAxMC43NSA4LjMgMS4yNWExLjUgMS41IDAgMCAwLTIuNiAwbC01LjQ5NCA5LjVBMS40OTQgMS40OTQgMCAwIDAgMS41IDEzaDExYTEuNDkzIDEuNDkzIDAgMCAwIDEuMjk0LTIuMjVNNi41IDUuNWEuNS41IDAgMCAxIDEgMFY4YS41LjUgMCAwIDEtMSAwek03IDExYS43NS43NSAwIDEgMSAwLTEuNS43NS43NSAwIDAgMSAwIDEuNScgc3R5bGU9J3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1kYXNob2Zmc2V0OjA7c3Ryb2tlLWxpbmVqb2luOm1pdGVyO3N0cm9rZS1taXRlcmxpbWl0OjQ7ZmlsbDojZmY5ZjM1O2ZpbGwtcnVsZTpub256ZXJvO29wYWNpdHk6MScgdHJhbnNmb3JtPSd0cmFuc2xhdGUoLjAyIDE5LjMwNSlzY2FsZSg3Ny4xNCknLz48L3N2Zz4=";
      case 'danger':
        return "data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0zm5.707 4.293L10 9.586 4.293 4.293c-.391-.391-1.024-.391-1.414 0s-.391 1.024 0 1.414L8.586 11l-5.707 5.293c-.391.391-.391 1.024 0 1.414s1.024.391 1.414 0L10 12.414l5.707 5.293c.391.391 1.024.391 1.414 0s.391-1.024 0-1.414L11.414 11l5.707-5.293c.391-.391.391-1.024 0-1.414s-1.024-.391-1.414 0z' fill='%23F45252'/%3E%3C/svg%3E";
      case 'note':
        return "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0zm0 15c-.552 0-1-.448-1-1s.448-1 1-1 1 .448 1 1-.448 1-1 1zm1-3H9V6h2v6z' fill='%230099FF'/%3E%3C/svg%3E";
      default:
        return "";
    }
  };
  return <div className={`alert alert--${type}`}>
      <div className="alert-icon" style={{
    backgroundImage: `url("${getIcon()}")`,
    backgroundRepeat: 'no-repeat',
    backgroundPosition: 'center center',
    backgroundSize: '20px',
    width: '24px',
    height: '24px',
    position: 'absolute',
    left: '16px',
    top: '16px'
  }} />
      <div className="alert-content">
        {title && <div className="alert-title">{title}</div>}
        <div className="alert-body">{children}</div>
      </div>
    </div>;
};

When you embed a Superblocks app into your website, you have several options for authentication:

* **Public**: anyone can view your app, no login required
* **Private**: users log in to Superblocks directly and must have [`apps:view`](/admin/org-administration/resource-roles#applications) permission to the application
* **SSO**: use your application's existing login flow so users only have to log in once to access the embedded Superblocks app

**Public** and **Private** embeds have no added set up. Follow instructions below to configure **SSO**.

## SSO authentication flow

With **SSO** embedding, users access your embedded app without needing a separate Superblocks login. Instead, you'll log users in with your app's existing auth and issue them a Superblocks session token for embedded auth. Using the Superblocks session token, your user's identity, level of access, and metadata are securely transmitted to Superblocks so they can't be modified by users client-side.

The following diagram illustrates the authentication flow for SSO embed users:

<div style={{ width: '100%', textAlign: 'center' }}>
  <img src="https://mintcdn.com/superblocks/gv-69CnRrBMTuWPu/images/applications/embedding/custom-login.jpg?fit=max&auto=format&n=gv-69CnRrBMTuWPu&q=85&s=9a3a29db362f490f7cca5b99a79aa83a" alt="Sequence diagram showing how to request a session token for an embedded user" title="Sequence diagram showing how to request a session token for an embedded user" className="no-box-shadow" style={{ maxWidth: 600 }} width="1654" height="828" data-path="images/applications/embedding/custom-login.jpg" />
</div>

## Set up embedded SSO

Use the following instructions to have your application authenticate users with Superblocks.

### Step 1. Generate an access token

<Alert type="warning">
  Only organization <strong>Admins</strong> can create Embed access tokens.
</Alert>

To get Superblocks session tokens for your embed users, you'll need to create an **Embed** access token. Follow the instructions below to create an access token, or learn more about [Access tokens](/admin/org-administration/auth/access-tokens).

1. Click your avatar in the upper-left corner of the home page and click **Organization Settings**

   <div style={{ width: '100%', textAlign: 'center' }}>
     <img src="https://mintcdn.com/superblocks/gv-69CnRrBMTuWPu/images/applications/embedding/avatar-menu.png?fit=max&auto=format&n=gv-69CnRrBMTuWPu&q=85&s=240d71751dd82d1c6342cdd5f6871297" alt="Menu for switching to settings menus" title="Menu for switching to settings menus" className="no-box-shadow" style={{ maxWidth: 300 }} width="506" height="594" data-path="images/applications/embedding/avatar-menu.png" />
   </div>

2. In the left sidebar, click **Access Tokens**

3. Click **+Create token**

4. In the **Name** field give your token a descriptive name

5. Select an **Expiration** date, or use the default 90 day expiration.

6. Select **Embed** as the token type

   <img src="https://mintcdn.com/superblocks/gv-69CnRrBMTuWPu/images/applications/embedding/access-token.png?fit=max&auto=format&n=gv-69CnRrBMTuWPu&q=85&s=b0945b5e8d4527635ba7964c70851c1e" alt="Interface for creating an embed access token" width="2560" height="1600" data-path="images/applications/embedding/access-token.png" />

7. Click **Create**

<Alert type="warning" title="Save your tokens immediately">
  Your access token is visible one time, immediately after you create it. If you leave or refresh the page where the token is displayed, it will be obscured and no longer visible. You must copy and store new access tokens somewhere secure before you leave the creation page, or you will lose access to the token.
</Alert>

### Step 2. Add token endpoint to your web-server

Add an endpoint to your web-server that requests user session tokens from Superblocks. You can add this as a new endpoint, or to your existing authentication flow.

<Tabs>
  <Tab title="Node.js (Express)">
    ```javascript server.js icon="js" theme={null}
    // Get user session token from Superblocks API
    app.get('/api/superblocks/token', checkAuthentication, async (req, res) => {

      // Assuming getUser returns the currently authenticated user
      const user = getUser(req);

      const config = {
        url: `https://app.superblocks.com/api/v1/public/token`,
        method: 'post',
        headers: {
          'Authorization': `Bearer ${YOUR_ACCESS_TOKEN_HERE}`,
          'Content-Type': 'application/json',
        },
        data: {
          email: user.email,
          name: `${user.firstName} ${user.lastName}`,
          metadata: {
            externalUserId: user.id,
            externalOrgId: user.organization.id
          }
        }
      };

      // Call endpoint to request a Superblocks session token on-behalf-of the authenticated user
      axios(config)
        .then((response) => {
          if (response.status === 200) {
            res.json(response.data);
          } else {
            throw new Error('Could not authenticate user with Superblocks');
          }
        })
        .catch((error) => {
          res.status(401).json({ error: 'unathorized', message: error.message });
        });
    });
    ```
  </Tab>

  <Tab title="Python (Flask)">
    ```python app.py icon="python" theme={null}
    from flask import jsonify
    import requests

    @app.route('/api/superblocks/token', methods=['GET'])
    def superblocks_auth():
        # Assuming getUser() returns the currently authenticated user
        user = getUser()

        # Call /token endpoint to request a session on-behalf-of the authenticated user
        response = requests.post(
            "https://app.superblocks.com/api/v1/public/token",
            headers={
                'Authorization': f'Bearer {YOUR_ACCESS_TOKEN_HERE}',
                'Content-Type': 'application/json'
            },
            json={
                'email': user.email,
                'name': f'{user.firstName} {user.lastName}',
                'metadata': {
                    'externalUserId': user.id,
                    'externalOrgId': user.organization.id
                }
            }
        )

        if response.status_code == 200:
            data = response.json()
            return jsonify(data)
        else:
            return jsonify({
                'error': 'unauthorized',
                'error_description': 'Could not authenticate user with Superblocks'
            }, 401)
    ```
  </Tab>

  <Tab title="Django">
    ```python views.py icon="python" theme={null}
    from django.http import JsonResponse
    from django.views import View
    from django.contrib.auth.mixins import LoginRequiredMixin
    import requests

    class SuperblocksAuth(LoginRequiredMixin, View):
        def get(self, request):
            user = request.user

            # Call /token endpoint to request a session on-behalf-of the authenticated user
            response = requests.post(
                "https://app.superblocks.com/api/v1/public/token",
                headers={
                    'Authorization': f'Bearer {YOUR_ACCESS_TOKEN_HERE}',
                    'Content-Type': 'application/json'
                },
                json={
                    'email': user.email,
                    'name': f'{user.firstName} {user.lastName}',
                    'metadata': {
                        'externalUserId': user.id,
                        'exgernalOrgId': user.organization.id
                    }
                }
            )

            if response.status_code == 200:
                data = response.json()
                return JsonResponse(data)
            else:
                return JsonResponse({
                    'error': 'unauthorized',
                    'error_description': 'Could not authenticate user with Superblocks'
                }, status=401)
    ```
  </Tab>
</Tabs>

Make sure to replace the payload with information for the currently authenticated user.

<Alert type="warning">
  Make sure your web server has CORS enabled if it's running on a different domain than your host application.
</Alert>

<Alert type="info">
  For a detailed explanation of the parameters, request format, and response format for the <code>/token</code> endpoint, please refer to the full <a href="#token-api-specification">API specification</a> below.
</Alert>

### Step 3. Request token client-side

Add code to your web application to request a session token from the token endpoint you just added to your application's web server.

<Tabs>
  <Tab title="React">
    ```tsx src/utils.tsx icon="react" theme={null}
    export const getSBToken = () => {
      return fetch(`https://${YOUR_API_DOMAIN}/api/superblocks/token`).then(
          res => res.json()
      ).then(
          data => data.access_token
      ).catch(
        err => {
          throw new Error('Superblocks Auth Error');
        }
      );
    }
    ```
  </Tab>

  <Tab title="JavaScript">
    ```js src/utils.js icon="js" theme={null}
    function getSBToken () {
      return fetch(`https://${YOUR_API_DOMAIN}/api/superblocks/token`).then(
          res => res.json()
      ).then(
          data => data.access_token
      ).catch(
        err => {
          throw new Error('Superblocks Auth Error');
        }
      );
    }
    ```
  </Tab>
</Tabs>

### Step 4. Pass the token to your embed

<Tabs>
  <Tab title="React">
    ```tsx src/views/embed_page.tsx icon="react" theme={null}
    import React, { useState, useEffect } from 'react';
    import { SuperblocksEmbed } from '@superblocksteam/embed-react';
    import { getSBToken } from '../utils';

    const PageWithEmbed = () => {
      const [token, setToken] = useState(null);

      useEffect(() => {
        getSBToken()
          .then((token) => setToken(token))
          .catch(err => console.log('Failed to get Superblocks auth token'));
      }, []);

      const handleFailedAuth = (err) => {
        console.log('Superblocks auth token invalid');
      }

      return <>
        { token ?
          <SuperblocksEmbed
            src='https://app.superblocks.com/code-mode/embed/applications/<APP_ID>'
            token={token}
            onAuthError={handleFailedAuth}
          /> :
          <div>Loading...</div>
        }
      </>;
    }
    ```
  </Tab>

  <Tab title="JavaScript">
    ```html src/pages/embed_page.html icon="js" theme={null}
    <script>
      const token = await getSBToken();
      const sbApp = Superblocks.createSuperblocksEmbed({
          id: "sb-app",
          src: 'https://app.superblocks.com/code-mode/embed/applications/<APP_ID>',
          token: token
      });

      document.body.appendChild(sbApp);
    </script>
    ```
  </Tab>
</Tabs>

## Manage user access

Embed users must have the [`apps:view`](/admin/org-administration/resource-roles#applications) permission to the Superblocks app they're trying to access.

Grant users access by associating them with a [**Group**](/admin/org-administration/groups) with the necessary access level. To associate an embed user with a group:

1. Click your avatar in the upper-left corner of the home page

2. In the menu, click **Organization Settings**

3. In the left sidebar, click **Groups**

4. Either select **+ Add group** or click into an existing group

5. On the **Permissions** tab, enable **View** access for apps you want the user(s) to have access to

   <img src="https://mintcdn.com/superblocks/gv-69CnRrBMTuWPu/images/applications/embedding/group-permissions.png?fit=max&auto=format&n=gv-69CnRrBMTuWPu&q=85&s=412b79ac586573a18b478e08774430f1" alt="Cash App Customer user group with view access to &#x22;Credit Card Application Processing&#x22; tool" width="2480" height="1218" data-path="images/applications/embedding/group-permissions.png" />

6. Go back to the **Groups** page and copy the group's ID by selecting **...** → **Copy group ID**

   <img src="https://mintcdn.com/superblocks/gv-69CnRrBMTuWPu/images/applications/embedding/groups-copy-id.png?fit=max&auto=format&n=gv-69CnRrBMTuWPu&q=85&s=bd9b790c199d50c9e76d9ed8ed245ca5" alt="Groups page with options menu open showing option to copy the group's ID" width="2480" height="648" data-path="images/applications/embedding/groups-copy-id.png" />

7. Update your [server endpoint](#step-2-add-token-endpoint-to-your-web-server) by adding a list of `groupIds` you want users to be associated with

<Tabs>
  <Tab title="Node.js (Express)">
    ```jsx theme={null}
    fetch("https://app.superblocks.com/api/v1/public/token", {
      ...
      body: JSON.stringify({
          'email': user.email,
          'name': `${user.firstName} ${user.lastName}`,

          // Superblocks Group IDs which grant view access to apps embedded in this website
          'groupIds': [
            'cc07e026-02c7-4ab5-b33b-232d57e7c804'
          ]
      })
    });
    ```
  </Tab>

  <Tab title="Python (Flask)">
    ```python theme={null}
    response = requests.post(
        "https://app.superblocks.com/api/v1/public/token",
        ...
        json={
            'email': user.email,
            'name': f'{user.firstName} {user.lastName}',

            # Superblocks Group IDs which grant view access to apps embedded in this website
            'groupIds': [
                'cc07e026-02c7-4ab5-b33b-232d57e7c804'
            ]
        }
    )
    ```
  </Tab>

  <Tab title="Django">
    ```python theme={null}
    # Call /token endpoint to request a session on-behalf-of the authenticated user
    response = requests.post(
        "https://app.superblocks.com/api/v1/public/token",
        ...
        json={
            'email': user.email,
            'name': f'{user.firstName} {user.lastName}',

            # Superblocks Group IDs which grant view access to apps embedded in this website
            'groupIds': [
                'cc07e026-02c7-4ab5-b33b-232d57e7c804'
            ]
        }
    )
    ```
  </Tab>
</Tabs>

Embed users aren't permanent members of groups and won't show up on the **Members** tab of groups. They are associated with the group for permissions purposes for the duration of the token's session.

## Customize user metadata

User metadata lets you attach additional information to a user beyond the standard attributes. This can be useful for storing extra data relevant to your application or business logic.

To customize user metadata, include a `metadata` field in your request payload with JSON representing the metadata you want to add. For example:

<Tabs>
  <Tab title="Node.js (Express)">
    ```jsx theme={null}
    fetch("https://app.superblocks.com/api/v1/public/token", {
        method: 'POST',
        ...
        body: JSON.stringify({
            'email': user.email,
            'name': `${user.firstName} ${user.lastName}`,
            'metadata': {
                'externalUserId': user.id,
                'externalOrgId': user.organization.id,

                // Additional user metadata to customize app behavior
                'isAdmin': user.roles.includes('Admin')
            }
        })
    });
    ```
  </Tab>

  <Tab title="Python (Flask)">
    ```python theme={null}
    response = requests.post(
        "https://app.superblocks.com/api/v1/public/token",
        ...
        json={
            'email': user.email,
            'name': f'{user.firstName} {user.lastName}',
            'metadata': {
                'externalUserId': user.id,
                'externalOrgId': user.organization.id,

                # Additional user metadata to customize app behavior
                'isAdmin': 'Admin' in user.roles
            }
        }
    )
    ```
  </Tab>

  <Tab title="Django">
    ```python theme={null}
    # Call /token endpoint to request a session on-behalf-of the authenticated user
    response = requests.post(
        "https://app.superblocks.com/api/v1/public/token",
        ...
        json={
            'email': user.Email,
            'name': f'{user.firstName} {user.lastName}',
            'metadata': {
                'externalUserId': user.id,
                'externalOrgId': user.organization.id

                # Additional user metadata to customize app behavior
                'isAdmin': 'Admin' in user.roles
            }
        }
    )
    ```
  </Tab>
</Tabs>

Metadata is associated with the user's current session and encoded in the session JWT as custom claims. This ensures that the metadata cannot be modified client-side, providing an additional layer of protection against unauthorized tampering.

You can [prompt Clark](/building-with-clark) to build any conditional logic based on this user metadata. For example, display, hide, or disable a certain component based on an `isAdmin` metadata attribute

<img src="https://mintcdn.com/superblocks/KHjvHFpLh3BONvUl/images/hosting/clark_embed_metadata.png?fit=max&auto=format&n=KHjvHFpLh3BONvUl&q=85&s=6ead28c23362ee90c33c9b981dd19740" alt="" width="3316" height="1368" data-path="images/hosting/clark_embed_metadata.png" />

Under the hood, Clark leverages the `useSuperblocksUser()` function to get the logged in user and check their metadata. Here is the code generated from the prompt above.

```tsx index.tsx icon="react" theme={null}
import { useSuperblocksUser } from "@superblocksteam/library";
import { Button } from "@/components/ui/button";
import { Icon } from "@/components/ui/icon";
import { Tooltip } from "@/components/ui/tooltip";

export default function Page1Component() {
  const user = useSuperblocksUser();

  const isAdmin = user?.metadata?.isAdmin === true;

  const deleteButton = (
    <Button variant="destructive" disabled={!isAdmin}>
      <Icon icon="trash-2" />
      Delete
    </Button>
  );

  return (
    <div className="min-h-svh overflow-auto p-4">
      {isAdmin ? (
        deleteButton
      ) : (
        <Tooltip tooltip="Admin access required to delete">
          {deleteButton}
        </Tooltip>
      )}
    </div>
  );
}
```

If you prefer to edit and review this logic directly, see [developing apps in code](/building-with-clark/developing-apps-in-code).

## Token API specification

#### POST `/api/v1/public/token`

Use this endpoint to request a session token for an embedded user.

**Request parameters**

`application/json`

| Parameter            | Required | Type    | Description                                                                                                                                                                                                                                                          |
| -------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `email`              | ✓        | String  | The user's email address, which uniquely identifies them in Superblocks.                                                                                                                                                                                             |
| `name`               |          | String  | The user's full display name.                                                                                                                                                                                                                                        |
| `groupIds`           |          | Array   | Superblocks Group IDs to associate the embed user with.                                                                                                                                                                                                              |
| `metadata`           |          | Object  | Object containing additional metadata about the user.                                                                                                                                                                                                                |
| `isSuperblocksUser`  |          | Boolean | If `TRUE`, the token will be associated with the Superblocks platform user with the email specified. If no platform user exists with that email, the user will get an Unauthorized error.                                                                            |
| `subject_token_type` |          | String  | The type of token being passed in `subject_token`. Required when using `subject_token`. Must be set to `urn:ietf:params:oauth:token-type:access_token`. See [On-Behalf-Of Token Exchange](/integrations/auth/oauth-20#on-behalf-of-token-exchange) for more details. |
| `subject_token`      |          | String  | An access token from an external identity provider (e.g., Okta, Auth0, your web server) that will be used in OAuth2.0 Token Exchange auth flows. See [On-Behalf-Of Token Exchange](/integrations/auth/oauth-20#on-behalf-of-token-exchange) for more details.        |

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl --request POST
        --url 'https://{REGION}.superblocks.com/api/v1/public/token' \
        --header 'authorization: Bearer {YOUR_ACCESS_TOKEN_HERE}' \
        --header 'content-type: application/json' \
        --data-raw '{
            "email":"jane.wind@company.com",
            "name": "Jane Wind",
            "metadata": {
                "externalUserId": "d942c6...72f362",
                "externalOrgId": "c32979...acf711"
            }
        }'
    ```
  </Tab>

  <Tab title="Node.js">
    ```jsx theme={null}
    const axios = require('axios');

    const config = {
        url: `https://${REGION}.superblocks.com/api/v1/public/token`,
        method: 'post',
        headers: {
            'Authorization': `Bearer ${YOUR_ACCESS_TOKEN_HERE}`,
            'Content-Type': 'application/json',
        },
        data: {
            "email": "jane.wind@company.com",
            "name": "Jane Wind",
            "metadata": {
                "externalUserId": "d942c6...72f362",
                "externalOrgId": "c32979...acf711"
            }
        }
    };

    axios(config)
    .then((response) => {
        if (response.status === 200) {
            res.json(response.data);
        } else {
            throw new Error('Could not authenticate user with Superblocks');
        }
    })
    .catch((error) => {
        res.status(401).json({ error: 'unathorized', message: error.message });
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests
    import json

    url = "https://{REGION}.superblocks.com/api/v1/public/token"

    payload = {
      "email": "jane.wind@company.com",
      "name": "Jane Wind",
      "metadata": {
        "externalUserId": "d942c6...72f362",
        "externalOrgId": "c32979...acf711"
      }
    }

    headers = {
      'authorization': 'Bearer {YOUR_ACCESS_TOKEN_HERE}',
      'content-type': 'application/json'
    }

    response = requests.request("POST", url, headers=headers, json=payload)

    print(response.text)
    ```
  </Tab>
</Tabs>

**Response Sample**

```json theme={null}
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_token":"eyJz93a...k4laUWw",
  "token_type":"Bearer",
  "expires_in":86400
}
```
