> For the complete documentation index, see [llms.txt](https://wemx.gitbook.io/wemx-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wemx.gitbook.io/wemx-api/api-reference/oauth-connections.md).

# 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>
