# Get connection (by provider)

## JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({containerTags: ['user_123', 'project_123']})
};

fetch('https://api.supermemory.ai/v3/connections/{provider}/connection', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

## Status Codes
- **200**
- **401**
- **404**
- **500**

## Response Example
```json
{
  "createdAt": "<string>",
  "id": "<string>",
  "provider": "<string>",
  "documentLimit": 123,
  "email": "<string>",
  "expiresAt": "<string>",
  "metadata": {},
  "containerTags": [
    "<string>"
  ]
}
```

## Authorizations

**Authorization**: string (header, required)

Bearer authentication header of the form `Bearer <token>`, where `<token>` is your auth token.

## Path Parameters

**provider**: enum<string> (required)

Available options:
- `notion`
- `google-drive`
- `onedrive`
- `gmail`
- `github`
- `web-crawler`
- `s3`

## Body

**containerTags**: string[] (required)

Comma-separated list of container tags to filter connection by.
- Minimum array length: `1`
- Maximum string length: `100`
- Pattern: `^[a-zA-Z0-9_:-]+$`

**Example**:
```json
["user_123", "project_123"]
```

## Response Structure

**200** (application/json): Connection details

- **createdAt**: string<datetime> (required)
- **id**: string (required)
- **provider**: string (required)
- **documentLimit**: number
- **email**: string
- **expiresAt**: string<datetime>
- **metadata**: object
- **containerTags**: string[] (deprecated)
