# OAuth Connections

## Get all oauth connections

<mark style="color:blue;">`GET`</mark> `https://wemx.app/api/v1/oauth-connections`

Returns all oauth connections made clients on your application

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "status": true,
    "current_page": 1,
    "data": [
        {
            "id": 5,
            "user_id": 442,
            "driver": "discord",
            "email": "jamesweb@example.com",
            "external_profile": null,
            "display_on_profile": 1,
            "data": {
                "id": "335517155586080768",
                "username": "jamesweb_",
                "avatar": "bah23pqiel2332asderm2sakwei",
                "discriminator": "0",
                "public_flags": 55,
                "premium_type": 1,
                "flags": 55,
                "banner": null,
                "accent_color": 1644829,
                "global_name": "JamesWeb",
                "avatar_decoration_data": null,
                "banner_color": "#19191d",
                "mfa_enabled": false,
                "locale": "en-US",
                "email": "jamesweb@example.com",
                "verified": true
            },
            "created_at": "2024-01-26T13:08:02.000000Z",
            "updated_at": "2024-01-26T13:08:02.000000Z"
        }
    ],
    "first_page_url": "http://wemx.app/api/v1/oauth-connections?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "http://wemx.app/api/v1/oauth-connections?page=1",
    "links": [
        {
            "url": null,
            "label": "Previous",
            "active": false
        },
        {
            "url": "http://wemx.app/api/v1/oauth-connections?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "http://wemx.app/api/v1/oauth-connections",
    "per_page": 15,
    "prev_page_url": null,
    "to": 2,
    "total": 2
}
```

{% endtab %}
{% endtabs %}

### Available Relationships (optional)

```
https://wemx.app/api/v1/oauth-connections?include=user
```

#### Available relationships:

`user`

## Filters (optional)

```
https://wemx.app/api/v1/oauth-connections?filter[transaction_id]=test
```

#### Available Filters:

`id`, `user_id`, `driver`, `email`, `data`, `external_profile`, `display_on_profile`

Tip: To filter JSON columns such as gateway, data and options, you can specify the key using \
`?filter[data->id]=589927390123721`

The above filter will return the user with discord id 589927390123721 you can also use it for other drivers.

## Sorting (optional)

```
https://wemx.app/api/v1/oauth-connections?sort[created_at]=asc
```

#### Available Sorting Parameters:

`id`, `user_id`, `driver`, `email`

#### Sorting operators

`asc`, `desc`, `random`

## Dates (optional)

```
https://wemx.app/api/v1/oauth-connections?date=30days
```

<table><thead><tr><th width="390">Operator</th><th>Description</th></tr></thead><tbody><tr><td>today</td><td>Get oauth connections created today</td></tr><tr><td>yesterday</td><td>Get oauth connections created yesterday</td></tr><tr><td><code>3days</code>, <code>7days</code>, <code>14days</code>, <code>30days</code>, <code>90days</code></td><td>Get oauth connections created last x days</td></tr><tr><td>YYYY-MM-DD,YYY-MM-DD</td><td>Get oauth connections created between a range of dates</td></tr></tbody></table>


---

# 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://wemx.gitbook.io/wemx-api/api-reference/oauth-connections.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.
