# Upland Users Authentication

{% hint style="info" %}
To continue you must have a developer account registered and an application.
{% endhint %}

The developer will provide Upland User a connection code to log in to your application. This code will be generated by the endpoint /auth/otp/init. The request must include basic authentication in the header call.

Basic access authentication is a method to provide a username and password when making a request. In basic HTTP authentication, a request contains a header field in the form of (Authorization: Basic \[credential]), where credentials are the Base64 encoding of ID and password joined by a single colon: For our case, you must consider the Username as the app ID and the password is the secret key(the provided when you created your application).&#x20;

<figure><img src="/files/17OAJeH6ojIUgkqOHb9Z" alt=""><figcaption><p>Postman basic auth example</p></figcaption></figure>

After you generate the code, you must display/text/email this code to the Upland user trying to connect with your application.

They will take the code and include it in their account to validate the connection with your application.

![](/files/wJXrNo185VQFOVfQVjGD)

![](/files/mxnDcLpGoAd0fh3QyJmS)

When the connection was finished with success the developer will receive via webhook the Upland User Access token to access information about him.

```json
{
    "type": "AuthenticationSuccess",
    "data": {
        "code": "B3FOHFBXEO",
        "userId": "ab374e80-d765-11ec-b21b-07f133e9e7e9",
        "accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.developers.upland.me/upland-developers/api-definitions/upland-users-authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
