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

# IdP API

## Introspection Endpoint

Use this endpoint to verify the access tokens issued by the IdP. This endpoint is mainly used by the IoT platform but may also be used by IoT devices to verify the received access token.

## Introspect token

<mark style="color:green;">`POST`</mark> `coaps://iot-idp.demo.coap-apps.iothentix.io/idp/introspect`

#### Request Body

| Name                                    | Type   | Description                                  |
| --------------------------------------- | ------ | -------------------------------------------- |
| token<mark style="color:red;">\*</mark> | String | Access token issued by the identity provider |
| client\_secret                          | String | Client secret for the basic authentication   |
| client\_id                              | String | Client ID for the basic authentication       |

{% tabs %}
{% tab title="201: Created In case the provided access token is VALID." %}

```json
{
    "active": true,
    "sub": "test.device.01",
    "scope": "tenant.demo refresh.token temp",
    "iss": "https://iot-idp.demo.apps.iothentix.com/",
    "exp": 1658179642
}
```

{% endtab %}

{% tab title="201: Created In case the provided access token is INVALID." %}

```json
{
    "active": false
}
```

{% endtab %}

{% tab title="500: Internal Server Error Internal error in the IdP infrastructure. " %}

```json
{
    "error": 
    {
        "code": 500,
        "status": "Internal Server Error",
        "request": "<REQUEST_ID>",
        "message": "An internal server error occurred, please contact the system administrator"
    }
}
```

{% endtab %}

{% tab title="401: Unauthorized The basic authentication failed. " %}

```json
{
    "error": "FORBIDDEN",
    "error_uri": "iot-idp.demo.apps.iothentix.com",
    "error_description": "The requested action was forbidden"
}
```

{% endtab %}

{% tab title="405: Method Not Allowed The requested method is not allowed for this resource." %}

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://iothentix.gitbook.io/api-reference/reference/coap-api-reference/idp-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
