# Basic authentication

The steps to encode an application’s consumer dappid and dappkey into a set of credentials to obtain a Bearer Token are:

{% hint style="info" %}
Before you begin, please ensure you have the following items ready:

• **Dapp ID** and **Dapp Key** - apply through 👉 [UXLINK official account](https://t.me/BTCneal) 👈
{% endhint %}

1. URL encode the consumer key and consumer secret according to [RFC 1738](http://www.ietf.org/rfc/rfc1738.txt). Note that at the time of writing, this will not actually change the consumer key and secret, but this step should still be performed in case the format of those values changes in the future.
2. Concatenate the encoded consumer key, a colon character ":", and the encoded consumer secret into a single string.
3. [Base64 encode](http://en.wikipedia.org/wiki/Base64) the string from the previous step.


---

# 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.uxlink.io/layer/api-and-sdk/uxlink-auth/basic-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.
