# Connect data sources

The Thryve Connection Widget allows end users to seamlessly manage data source connections within your application. There is no need for additional views or logic from your side. Simply embed the widget's URL, provided by the API, into your web application. This will display all available data sources and their connection statuses to your users.

<figure><img src="/files/GYon1FGHKQPneKHozx5C" alt="" width="188"><figcaption><p>Thryve Connection Widget sample for a user connected to Strava</p></figcaption></figure>

{% hint style="info" %}
The Connection Widget must be embedded in your app using an iframe component. Opening the URL in a new tab or window will prevent the widget from properly redirecting users back to your web app.
{% endhint %}

{% hint style="warning" %}
Before requesting the Connection Widget, ensure you [create a Thryve user](/integrate-your-web-app/create-thryve-user.md). The returned `endUserId` (`accessToken`) is required to generate the Connection Widget.
{% endhint %}

## POST /widget/v6/connection

> Returns Thryve Connection Widget for requesting user

```json
{"openapi":"3.1.0","info":{"title":"Connection Widget API","version":"1.0.0"},"servers":[{"url":"https://api.thryve.de"}],"paths":{"/widget/v6/connection":{"post":{"tags":["Widgets"],"summary":"Returns Thryve Connection Widget for requesting user","description":null,"parameters":[{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Basic Auth for your username:password. Required for all endpoints"},{"name":"AppAuthorization","in":"header","required":true,"schema":{"type":"string"},"description":"Basic Auth for your authID:authSecret. Required for all endpoints."}],"requestBody":{"description":null,"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestEndUserConnectionWidget"}}}},"responses":{"200":{"description":"Successful response containing URL of Thryve Widget for requesting user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEndUserConnectionWidget"}}}},"400":{"description":"Bad Request – invalid input parameters."},"500":{"description":"Internal Server Error."}}}}},"components":{"schemas":{"RequestEndUserConnectionWidget":{"type":"object","properties":{"endUserId":{"type":"string","description":"The end user identifier. The data source connected via the Widget session will be linked to this user."},"locale":{"enum":["ar","bg","cs","en","da","de","el","es","et","fi","fr","hu","id","it","ja","ko","lt","lv","nl","pl","pt","ro","ru","sk","sl","sv","tr","uk"],"description":"Manually set the language code following ISO 639-1 to set the language that will be used on UI elements, e.g. the Thryve Widget. If not set it will default to english."}},"required":["endUserId"]},"ResponseEndUserConnectionWidget":{"type":"object","properties":{"type":{"enum":["enduser.widget.connection"]},"data":{"type":"object","properties":{"url":{"type":"string","description":"The URL for the Thryve Connection Widget for the requested user. The URL will expire."}},"required":["url"]}},"required":["type","data"]}}}}
```


---

# Agent Instructions: 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:

```
GET https://docs.thryve.health/connect-data-sources.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
