# Test API

Learn about the APIs for starting an Identity Provider connection test and retrieving its results.

> For the index of this section of the site, see [llms.txt](https://fusionauth.io/docs/llms.txt)

Available since `1.65.0`

The Identity Provider connection testing API allows you to test an Identity Provider connection, even when disabled, to ensure that the configuration is correct and that FusionAuth can connect to the 3rd party provider. This API is useful for troubleshooting connectivity issues with an Identity Provider.

Note

This API does not create or update users or registrations, or generate an authorization code or tokens.

## Start an Identity Provider Connection Test

### Request

[API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#api-key-authentication)

Start an Identity Provider Connection Test for a given IdP and Tenant

`POST /api/identity-provider/test`

#### Request Body

`identityProviderId`

*   UUID
*   required

The unique Id of the Identity Provider configuration to be tested.

`tenantId`

*   UUID
*   required

The unique Id of the Tenant to use for this test. This field is required.

Example Identity Provider Test Request JSON

```json
{
  "identityProviderId": "4d3f5f7d-8e89-4c06-9d2b-8fbf8cdbb123",
  "tenantId": "9e8f88c4-9f89-49f2-9db5-6cbf6f4f9abc"
}
```

### Response

*Response Codes*

| Code | Description |
| --- | --- |
| 200 | The request was successful. The response will contain a JSON body. |
| 400 | The request was invalid and/or malformed. The response will contain an [Errors](https://fusionauth.io/docs/apis/errors.md) JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present. |
| 401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See [Authentication](https://fusionauth.io/docs/apis/authentication.md). |
| 500 | There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty. |

#### Response Body

`connectionTestId`

*   String

The unique Id of the identity provider connection test that was executed.

Example Identity Provider Test Response JSON

```json
{
  "connectionTestId": "f1e2d3c4-b5a6-47a8-9012-3456789abcde"
}
```

Note

The returned `connectionTestId` is temporary and expires after the Tenant-configured external identifier TTL. Configure this value using `tenant.externalIdentifierConfiguration.identityProviderConnectionTestTimeToLiveInSeconds` (default `1800` seconds).

## Retrieve Identity Provider Connection Test Results

### Request

[API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#api-key-authentication)

Retrieve Identity Provider Connection Test Results

`GET /api/identity-provider/test?connectionTestId={connectionTestId}`

#### Request Parameters

`connectionTestId`

*   String
*   required

The connection test Id returned by the Start Identity Provider Connection Test API.

### Response

*Response Codes*

| Code | Description |
| --- | --- |
| 200 | The request was successful. The response will contain a JSON body. |
| 400 | The request was invalid and/or malformed. The response will contain an [Errors](https://fusionauth.io/docs/apis/errors.md) JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present. |
| 401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See [Authentication](https://fusionauth.io/docs/apis/authentication.md). |
| 404 | The object you requested doesn't exist. The response will be empty. |
| 500 | There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty. |

#### Response Body

`result.success`

*   Boolean

Whether the test completed successfully. This is `true` only when at least one step exists and all recorded steps succeeded.

`result.startInstant`

*   DateTime

The instant at which the test began.

`result.identityProviderId`

*   UUID

The Identity Provider Id used for the test.

`result.identityProviderUserId`

*   String
*   optional

The third-party user Id resolved during the test, if available.

`result.email`

*   String
*   optional

The reconciled email address, if available.

`result.username`

*   String
*   optional

The reconciled username, if available.

`result.steps`

*   Array<Object>

Ordered trace steps captured during the connection test.

`result.steps[].title`

*   String

The step title.

`result.steps[].success`

*   Boolean

Whether the step succeeded.

`result.steps[].detail`

*   String

Additional detail for the step.

Example Identity Provider Test Results Response JSON

```json
{
  "result": {
    "success": true,
    "startInstant": "2026-04-21T15:04:05.123Z",
    "identityProviderId": "4d3f5f7d-8e89-4c06-9d2b-8fbf8cdbb123",
    "identityProviderUserId": "41",
    "email": "example@fusionauth.io",
    "username": "example",
    "steps": [
      {
        "title": "Success",
        "success": true,
        "detail": "The identity provider login successfully reconciled a user."
      }
    ]
  }
}
```

Related

[APIs Apple API Learn about the APIs for creating, retrieving, updating and disabling an Apple identity provider. fusionauth apirest apihttp api](https://fusionauth.io/docs/apis/identity-providers/apple.md)

[APIs Epic Games API Learn about the APIs for creating, retrieving, updating and disabling an Epic Games identity provider. fusionauth apirest apihttp api](https://fusionauth.io/docs/apis/identity-providers/epicgames.md)

[APIs External JWT API Learn about the APIs for creating, retrieving, updating and deleting external JWT identity providers. fusionauth apirest apihttp api](https://fusionauth.io/docs/apis/identity-providers/external-jwt.md)

[APIs Facebook API Learn about the APIs for creating, retrieving, updating and disabling a Facebook identity provider. fusionauth apirest apihttp api](https://fusionauth.io/docs/apis/identity-providers/facebook.md)
---

## Other pages in Identity Providers

> For the full index of this section, see [Apis](https://fusionauth.io/docs/llms-apis.txt).

- [Apple API](https://fusionauth.io/docs/apis/identity-providers/apple.md): Learn about the APIs for creating, retrieving, updating and disabling an Apple identity provider.
- [Epic Games API](https://fusionauth.io/docs/apis/identity-providers/epicgames.md): Learn about the APIs for creating, retrieving, updating and disabling an Epic Games identity provider.
- [External JWT API](https://fusionauth.io/docs/apis/identity-providers/external-jwt.md): Learn about the APIs for creating, retrieving, updating and deleting external JWT identity providers.
- [Facebook API](https://fusionauth.io/docs/apis/identity-providers/facebook.md): Learn about the APIs for creating, retrieving, updating and disabling a Facebook identity provider.
- [Google API](https://fusionauth.io/docs/apis/identity-providers/google.md): Learn about the APIs for creating, retrieving, updating and disabling a Google identity provider.
- [HYPR API](https://fusionauth.io/docs/apis/identity-providers/hypr.md): Learn about the APIs for creating, retrieving, updating and disabling a HYPR identity provider.
- [Identity Provider API](https://fusionauth.io/docs/apis/identity-providers.md): Learn about the APIs for creating, retrieving, updating and deleting identity providers.
- [LinkedIn API](https://fusionauth.io/docs/apis/identity-providers/linkedin.md): Learn about the APIs for creating, retrieving, updating and disabling a LinkedIn identity provider.
- [Links API](https://fusionauth.io/docs/apis/identity-providers/links.md): Learn about the APIs for creating, retrieving, and deleting Identity Provider Links.
- [Nintendo API](https://fusionauth.io/docs/apis/identity-providers/nintendo.md): Learn about the APIs for creating, retrieving, updating and deleting a Nintendo identity provider.
- [OpenID Connect API](https://fusionauth.io/docs/apis/identity-providers/openid-connect.md): Learn about the APIs for creating, retrieving, updating and deleting OpenID Connect identity providers.
- [SAML v2 IdP Initiated API](https://fusionauth.io/docs/apis/identity-providers/samlv2-idp-initiated.md): Learn about the APIs for creating, retrieving, updating and deleting SAML v2 IdP Initiated identity providers.
- [SAML v2 API](https://fusionauth.io/docs/apis/identity-providers/samlv2.md): Learn about the APIs for creating, retrieving, updating and deleting SAML v2 identity providers.
- [Sony PlayStation Network API](https://fusionauth.io/docs/apis/identity-providers/sonypsn.md): Learn about the APIs for creating, retrieving, updating and disabling a Sony PlayStation Network identity provider.
- [Steam API](https://fusionauth.io/docs/apis/identity-providers/steam.md): Learn about the APIs for creating, retrieving, updating and disabling a Steam identity provider.
- [Twitch API](https://fusionauth.io/docs/apis/identity-providers/twitch.md): Learn about the APIs for creating, retrieving, updating and disabling a Twitch identity provider.
- [Twitter/X API](https://fusionauth.io/docs/apis/identity-providers/twitter.md): Learn about the APIs for creating, retrieving, updating and disabling a Twitter/X identity provider.
- [Xbox API](https://fusionauth.io/docs/apis/identity-providers/xbox.md): Learn about the APIs for creating, retrieving, updating and disabling an Xbox identity provider.
