Overview
POST
/auth/link-providerauthLink a verified OAuth provider identity to the caller
Create a record in link-provider.
Auth: bearerAuth — calls run as the authenticated user.
Request body
application/json · optional
- clientSlugstring
- providerSlugstring
- codeoptionalstring
- accessTokenoptionalstring
- idTokenoptionalstring
- redirectUrioptionalstring
Example
{
"clientSlug": "string",
"providerSlug": "string",
"code": "string",
"accessToken": "string",
"idToken": "string",
"redirectUri": "string"
}Responses
200
linked
- linkedboolean
- providerstring
Example
{
"linked": true,
"provider": "string"
}400
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}403
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}404
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}409
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/auth/link-provider" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"clientSlug": "string",
"providerSlug": "string",
"code": "string",
"accessToken": "string",
"idToken": "string",
"redirectUri": "string"
}'JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/auth/link-provider", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"clientSlug\": \"string\",\n \"providerSlug\": \"string\",\n \"code\": \"string\",\n \"accessToken\": \"string\",\n \"idToken\": \"string\",\n \"redirectUri\": \"string\"\n}",
});
const data = await res.json();