> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get auth link status

> Check whether an auth link is pending, expired, or connected.

Returns the current status of an auth link created by your team.

## Endpoint

```http theme={"dark"}
GET /v1/connections/auth-links/{auth_link_id}/status
```

## Path Parameters

| Parameter      | Type   | Description                                                |
| -------------- | ------ | ---------------------------------------------------------- |
| `auth_link_id` | string | Auth link ID returned by `POST /v1/connections/auth-link`. |

## Example Request

```bash theme={"dark"}
curl https://api.markifact.com/v1/connections/auth-links/7b6a5c4d-0000-0000-0000-000000000000/status \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Response

```json theme={"dark"}
{
  "id": "7b6a5c4d-0000-0000-0000-000000000000",
  "status": "connected",
  "connection_type": "ga4",
  "connection_id": "1f2e3d4c-0000-0000-0000-000000000000",
  "external_id": "customer_123",
  "expires_at": 1764086400000,
  "consumed_at": 1764000000000,
  "created_at": 1763999900000,
  "updated_at": 1764000000000,
  "connections": [
    {
      "id": "1f2e3d4c-0000-0000-0000-000000000000",
      "type": "ga4",
      "display_name": "login@example.com",
      "external_id": "customer_123",
      "is_private": false,
      "created_at": 1764000000000,
      "updated_at": 1764000000000
    }
  ]
}
```

## Status Values

| Status      | Description                                               |
| ----------- | --------------------------------------------------------- |
| `pending`   | The auth link has not been completed and has not expired. |
| `connected` | The OAuth flow completed and the auth link was consumed.  |
| `expired`   | The auth link expired before completion.                  |

## Connections

The `connection_id` field is populated after a successful OAuth flow. The `connections` array contains that exact connection when it is still available to your team.

If the link is pending, expired, or the connection was later deleted, `connections` is an empty list.

You can pass `connection_id` to Markifact MCP using `X-Markifact-Context` when you want an MCP request to use only this connected account. This is the recommended option when your MCP client supports custom headers:

```http theme={"dark"}
X-Markifact-Context: {"connection_ids":["CONNECTION_ID"]}
```

If your MCP client does not support custom headers, pass the connection ID in the MCP URL instead:

```text theme={"dark"}
https://api.markifact.com/mcp?connection_ids=CONNECTION_ID
```

Passing `{"connection_ids":[]}` or using `?connection_ids=` explicitly allows no connections for that request. Omit runtime context to use the MCP server's normal saved connection settings. If both the header and query parameter are provided, `X-Markifact-Context` is used.


## OpenAPI

````yaml GET /v1/connections/auth-links/{auth_link_id}/status
openapi: 3.1.0
info:
  title: Markifact API
  version: 1.0.0
  description: API for managing Markifact workspace connections.
servers:
  - url: https://api.markifact.com
security:
  - bearerAuth: []
paths:
  /v1/connections/auth-links/{auth_link_id}/status:
    get:
      tags:
        - Connections
      summary: Get auth link status
      description: Check whether an auth link is pending, expired, or connected.
      operationId: getAuthLinkStatus
      parameters:
        - name: auth_link_id
          in: path
          required: true
          schema:
            type: string
          description: Auth link ID returned by Create auth link.
      responses:
        '200':
          description: Auth link status returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthLinkStatus'
        '404':
          description: Auth link not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AuthLinkStatus:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - pending
            - connected
            - expired
        connection_type:
          type: string
        connection_id:
          type:
            - string
            - 'null'
        external_id:
          type:
            - string
            - 'null'
        expires_at:
          type: integer
          format: int64
        consumed_at:
          type:
            - integer
            - 'null'
          format: int64
        created_at:
          type: integer
          format: int64
        updated_at:
          type: integer
          format: int64
        connections:
          type: array
          items:
            $ref: '#/components/schemas/Connection'
      required:
        - id
        - status
        - connection_type
        - expires_at
        - created_at
        - updated_at
        - connections
    Error:
      type: object
      properties:
        detail: {}
    Connection:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
          description: Public Markifact connection ID.
        type:
          type: string
          description: Connection type.
        display_name:
          type:
            - string
            - 'null'
        external_id:
          type:
            - string
            - 'null'
        is_private:
          type: boolean
        created_at:
          type:
            - integer
            - 'null'
          format: int64
        updated_at:
          type:
            - integer
            - 'null'
          format: int64
      required:
        - id
        - type
        - is_private
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````