Overview
PATCH
/oauth/providers/{slug}oauthUpdate a provider (admin)
Update fields of a record in providers by slug.
Auth: bearerAuth — calls run as the authenticated user.
Parameters
- slugpathstring
Request body
application/json · optional
- slugoptionalstring
- displayNameoptionalstring
- clientIdoptionalstring
- clientSecretoptionalstring
- scopesoptionalstring[]
- authorizeUrloptionalstring?
- tokenUrloptionalstring?
- userinfoUrloptionalstring?
- identityMappingoptionalobject
Example
{
"slug": "string",
"displayName": "string",
"clientId": "string",
"clientSecret": "string",
"scopes": [
"string"
],
"authorizeUrl": "string",
"tokenUrl": "string",
"userinfoUrl": "string",
"identityMapping": {
"subjectField": "string",
"emailField": "string",
"nameField": "string",
"avatarField": "string",
"verificationUrl": "string",
"requireEmailVerified": true,
"allowedAudiences": [
"string"
],
"secondaryEmailUrl": "string"
}
}Responses
200
Provider
- idstring
- slugstring
- namestring
- authType"oauth2_code" | "oauth2_access_token" | "oidc_id_token"
- authorizeUrloptionalstring?
- tokenUrloptionalstring?
- userinfoUrloptionalstring?
- clientIdstring
- scopesstring[]
- identityMappingobject
Example
{
"id": "string",
"slug": "string",
"name": "string",
"authType": "oauth2_code",
"authorizeUrl": "string",
"tokenUrl": "string",
"userinfoUrl": "string",
"clientId": "string",
"scopes": [
"string"
],
"identityMapping": {
"subjectField": "string",
"emailField": "string",
"nameField": "string",
"avatarField": "string",
"verificationUrl": "string",
"jwksUrl": "string",
"requireEmailVerified": true,
"allowedAudiences": [
"string"
],
"secondaryEmailUrl": "string"
}
}401
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 PATCH "https://api.agenticdeveloperhub.com/oauth/providers/{slug}" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"slug": "string",
"displayName": "string",
"clientId": "string",
"clientSecret": "string",
"scopes": [
"string"
],
"authorizeUrl": "string",
"tokenUrl": "string",
"userinfoUrl": "string",
"identityMapping": {
"subjectField": "string",
"emailField": "string",
"nameField": "string",
"avatarField": "string",
"verificationUrl": "string",
"requireEmailVerified": true,
"allowedAudiences": [
"string"
],
"secondaryEmailUrl": "string"
}
}'JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/oauth/providers/{slug}", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"slug\": \"string\",\n \"displayName\": \"string\",\n \"clientId\": \"string\",\n \"clientSecret\": \"string\",\n \"scopes\": [\n \"string\"\n ],\n \"authorizeUrl\": \"string\",\n \"tokenUrl\": \"string\",\n \"userinfoUrl\": \"string\",\n \"identityMapping\": {\n \"subjectField\": \"string\",\n \"emailField\": \"string\",\n \"nameField\": \"string\",\n \"avatarField\": \"string\",\n \"verificationUrl\": \"string\",\n \"requireEmailVerified\": true,\n \"allowedAudiences\": [\n \"string\"\n ],\n \"secondaryEmailUrl\": \"string\"\n }\n}",
});
const data = await res.json();