# Resolver API

The Resolver API returns a wallet address for Twitter users, emails, phone numbers, and other user IDs.

One API call to find a Web3 wallet address for anyone on the internet.

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Web2 Providers</strong></td><td><ul><li><code>twitter</code></li><li><code>email</code></li><li><code>tel</code></li><li><code>github</code></li></ul></td></tr><tr><td><strong>App Providers</strong></td><td><ul><li>Get a wallet to embedded directly in your app. You control authentication.</li><li><em>Reach out on Discord</em></li></ul></td></tr><tr><td></td><td></td></tr></tbody></table>

### **How it Works**

Input a Twitter user, email, phone number, or any other user\_id and get a Patch Wallet address in return. It's that simple. The wallet is just like any other smart contract account and can store any tokens/NFTs.

{% hint style="info" %}
The Resolver API does not require authentication.
{% endhint %}

#### userId

A userId is a unique provider and username ( like `twitter:elonmusk`, `tel:19198675309`, `email:test@gmail.com`) and returns a wallet address for them on a given chain (`matic:0xabc...123`).&#x20;

**Example userIds:**

* `twitter:elonmusk`
* `github:torvalds`
* `tel:19198675309`
* `email:your@mom.com`

![](/files/mNZRZzYgofHDR5s3VjdI)

## Resolve userIds

To use, [check out our Postman collection here.](https://www.postman.com/paymagic/workspace/public-patch-wallet-api)

## Takes userIds and returns a list of account addresses

<mark style="color:green;">`POST`</mark> `https://paymagicapi.com/v1/resolver`

Takes userIds in the body seperated by "," and returns a list of account addresses.

*E.g.* `twitter:elonmusk,github:torvalds,email:test@gmail.com`&#x20;

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

#### Request Body

| Name                                      | Type   | Description                                                                 |
| ----------------------------------------- | ------ | --------------------------------------------------------------------------- |
| userIds<mark style="color:red;">\*</mark> | String | <p></p><p></p><p>a list of all the users separated by "," with no space</p> |

{% tabs %}
{% tab title="400: Bad Request Invalid request" %}

{% endtab %}

{% tab title="200: OK Return a list of wallet addresses" %}

```json
{
    "updatedAt":"2023-05-01T19:17:43.079Z",
    "users":
        [
            {
                "userId":"twitter:elonmusk",
                "accountAddress":"0x3A782C4B50CF4d82Ce489623E9204B8e4c6a133F"
            },
            {    
                "userId":"email:ur@mom69.com",
                "accountAddress":"0x65b49E21e717f115AadD4cA820f75EA65B69581f"
            },
            {
                "userId":"tel:19198675309",
                "accountAddress":"0xf1F4500871b4F7334De2577D0661Ac57FC94523A"
            },
            {
                "userId":"github:torvalds",
                "accountAddress":"0xDb17D7D1E13cbA8277B8F5FF55FE2d4606251C36"
            }
        ]
}
```

{% endtab %}
{% endtabs %}


---

# 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.patchwallet.com/api/resolver-api.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.
