> For the complete documentation index, see [llms.txt](https://docs.ur.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ur.app/getting-started/api-authentication.md).

# API authentication

How authentication works when integrating with UR APIs.

UR uses [**Ethereum Personal Sign (EIP-191)**](https://eips.ethereum.org/EIPS/eip-191) for all API authentication. While there are no API keys or OAuth tokens, the concept is fundamentally the same: you register a key with UR, sign your requests with it, and UR verifies the signature on every call.

## Registering and deregistering keys

During onboarding you get an ECDSA key pair whose public address (an Ethereum address) is registered with UR. This is your authentication credential. You have two ways to obtain it: create it in the [API sandbox](https://partner.ur.app/api-sandbox), which generates the key pair and registers it for you, or generate the key pair yourself and send UR only the public address. Either way, UR stores only the public address and never your private key. You can rotate keys by registering a new address and deregistering the old one through your dedicated integration channel. For both paths and the full lifecycle, see [API signing key](/getting-started/integration-guide.md#api-signing-key).

## Two authentication methods

| Method                                    | Used for                                              | Who signs                          |
| ----------------------------------------- | ----------------------------------------------------- | ---------------------------------- |
| Partner authentication (server-to-server) | UR-OPEN-API and Webhooks                              | Your backend's registered key pair |
| User authentication (wallet-to-server)    | UR-API (sensitive user operations like FX, transfers) | The user's wallet                  |

## How it works

```mermaid
flowchart LR
    A[Generate key pair] --> B[Register public address with UR]
    B --> C[Sign API requests with private key]
    C --> D[UR verifies signature]
    D --> E[Request authenticated]
```

{% hint style="info" %}
For webhook verification, the flow is reversed: UR signs the response body, and your backend verifies the signature against UR's known server address.
{% endhint %}

For the full signing logic, code examples, and environment addresses, see [Signature and Verify](https://docs.ur.app/api-reference/signature-and-verify).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ur.app/getting-started/api-authentication.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
