Get a fresh credential link
request_connection_linkMint a fresh credential link for a service datasource. Native MCP connections re-link in place; their hosted page uses Test and finish (or OAuth sign-in), and ready connections require reconnect: true. A Custom OAuth datasource keeps its declared resource and optional scopes; the Administrator must open the credential page and sign in on the hosted page, with no pasted token. Initial setup becomes ready only after sign-in completes. For a ready oauth2_auth_code datasource or external_platform card, explicitly pass reconnect: true to sign in again while keeping the connection, any published module and approvals. Failed OAuth connections and platform cards also re-link in place. The status and serving grant stay as the Request Service reports until sign-in succeeds; failed or declined re-sign-in keeps the serving grant. A typed-credential page still configuring is renewed for the same connection. A Custom datasource published against a card renews the page of its own credential connection, which its module pins, when configuring or failed, or ready with reconnect: true. A ready, unbound typed-credential connection (env) also renews in place with explicit reconnect: true once it owes no Data Access key. Either renewal keeps the connection, any published module and its approvals, and a bound one its card binding; stored credentials stay in force until replacements are saved. Only an Administrator can open a renewed page, bound or unbound, so give the link to an Administrator rather than to whoever asked: the replacement is written to the account of the Administrator who opens it, or to the shared set where the connection is shared. Without reconnect, a ready connection that owes nothing is refused with already_connected. Outside sign-in, MCP and card-bound connections, one that still owes its Data Access key is replaced instead, configuring or ready, which delivers a fresh key and asks for the credentials again (a ready one only without reconnect). For a ready connection that still owes its Data Access key, rotating the Data Access Point's key again (Rotate key on the Data Access Points page in Admin, /projects/{project_id}/data-access-points) restores it on the same connection; a new link replaces the connection and the person must enter the credentials again. The person enters replacements on the Request Service's page or consents on the platform page; a typed re-link finishes with Save credentials and finish, while MCP uses Test and finish or its OAuth sign-in action. A newly minted link lasts one hour from issue; opening or reloading does not use it up, and successful completion does. The credential never passes through this conversation. Requires the project's datasource-management grant and an Administrator caller.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"datasource_id": "<datasource_id>"
},
"name": "request_connection_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reconnect | No | Explicitly reconnect a native MCP connection, request sign-in again for an oauth2_auth_code datasource or external_platform card, or replace typed credentials in place on an unbound connection or a card-bound Custom datasource's own connection; required when ready, default false | |
| datasource_id | Yes | The service datasource UUID | |
| application_id | No | Optional Application UUID whose build this call serves (Administrator only). Setup steps this call opens record it, so they show on that Application's build screen; the resources themselves stay shared by the Project. A shared step it reuses keeps the Application it was opened for, so a step it returns may be watchable with get_setup_journal only without application_id. Use the build's application_id, the one you call describe_application with. |