Upsert ThirdParty Provider configuration
Creates or updates ThirdParty Provider Config for a tenant.
If skipValidation is set to true, the config will be saved without any validation.
If the config already exists for the given tenantId and thirdPartyId, the config in the core will be completely replaced with the config provided in the request body.
Validations done by the core:
thirdPartyId and name are required
Common to all providers:
clientslist:- can be undefined or empty
- if contains 1 element, clientType can be empty or undefined
- if contains more than 1 element, clientType must be defined and unique
- for each element in
clients:clientIdmust not be empty
Built-in provider’s specific validation is invoked if the thirdPartyId starts with the provider’s id
Apple (id: apple):
clients- if it contains elements, each of them are validated as follows:
clientSecretmust be empty or undefinedadditionalConfigshould contain the following keys:keyIdmust be a non empty stringteamIdmust be a non empty stringprivateKeymust be a non empty string
- if it contains elements, each of them are validated as follows:
Google Workspaces (id: google-workspaces):
clients- if it contains elements, each of them are validated as follows:
additionalConfigmay contain the keyhdhdis optional- if specified, it must be either
"*", or a valid domain
- if it contains elements, each of them are validated as follows:
Boxy SAML (id: boxy-saml):
clientsadditionalConfigin the each element must containboxyURLand must be non-empty string
PUT
/appid-{appId}/{tenantId}/recipe/multitenancy/config/thirdpartyAuthorization
api-keyAPI key · headerrequiredThe core service API token. If you are using a self-hosted core service and you have not generated a token, you can omit the header.
Path parameters
tenantIdstringThe tenant against which the request is made. If left empty, the default tenant will be used.
Header parameters
ridstringcdi-versionstringX.Y of the X.Y.Z CDI version.
Request body
application/jsonconfigthirdPartyProviderConfigrequiredShow propertiesHide properties
thirdPartyIdstringrequirednamestringclientsobject[]Show propertiesHide properties
Array of
objectclientTypestringclientIdstringclientSecretstringscopestring[]forcePKCEbooleanadditionalConfigobjectauthorizationEndpointstringauthorizationEndpointQueryParamsobjecttokenEndpointstringtokenEndpointBodyParamsobjectuserInfoEndpointstringuserInfoEndpointQueryParamsobjectuserInfoEndpointHeadersobjectjwksURIstringoidcDiscoveryEndpointstringrequireEmailbooleandefault: true
userInfoMapobjectShow propertiesHide properties
fromIdTokenPayloadobjectShow propertiesHide properties
userIdstringemailstringemailVerifiedstringfromUserInfoAPIobjectShow propertiesHide properties
userIdstringemailstringemailVerifiedstringskipValidationbooleanResponses
200Create or Update result
One of:
object
statusstatusOKrequiredAllowed:
OKcreatedNewbooleanrequiredobject
statusstringrequiredAllowed:
CONFIG_VALIDATION_ERRORreasonstringrequired400error code 400
string401error code 401
string402error code 402
string404error code 404
string500error code 500
stringTry it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PUT "/appid-{appId}/public/recipe/multitenancy/config/thirdparty" \
-H "api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"config": {
"thirdPartyId": "string",
"name": "string",
"clients": [
{
"clientType": "string",
"clientId": "string",
"clientSecret": "string",
"scope": [
"string"
],
"forcePKCE": true,
"additionalConfig": {}
}
],
"authorizationEndpoint": "string",
"authorizationEndpointQueryParams": {},
"tokenEndpoint": "string",
"tokenEndpointBodyParams": {},
"userInfoEndpoint": "string",
"userInfoEndpointQueryParams": {},
"userInfoEndpointHeaders": {},
"jwksURI": "string",
"oidcDiscoveryEndpoint": "string",
"requireEmail": true,
"userInfoMap": {
"fromIdTokenPayload": {
"userId": "string",
"email": "string",
"emailVerified": "string"
},
"fromUserInfoAPI": {
"userId": "string",
"email": "string",
"emailVerified": "string"
}
}
},
"skipValidation": false
}'const response = await fetch("/appid-{appId}/public/recipe/multitenancy/config/thirdparty", {
method: "PUT",
headers: {
"api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"config": {
"thirdPartyId": "string",
"name": "string",
"clients": [
{
"clientType": "string",
"clientId": "string",
"clientSecret": "string",
"scope": [
"string"
],
"forcePKCE": true,
"additionalConfig": {}
}
],
"authorizationEndpoint": "string",
"authorizationEndpointQueryParams": {},
"tokenEndpoint": "string",
"tokenEndpointBodyParams": {},
"userInfoEndpoint": "string",
"userInfoEndpointQueryParams": {},
"userInfoEndpointHeaders": {},
"jwksURI": "string",
"oidcDiscoveryEndpoint": "string",
"requireEmail": true,
"userInfoMap": {
"fromIdTokenPayload": {
"userId": "string",
"email": "string",
"emailVerified": "string"
},
"fromUserInfoAPI": {
"userId": "string",
"email": "string",
"emailVerified": "string"
}
}
},
"skipValidation": false
})
});import requests
response = requests.put(
"/appid-{appId}/public/recipe/multitenancy/config/thirdparty",
headers={
"api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"config": {
"thirdPartyId": "string",
"name": "string",
"clients": [
{
"clientType": "string",
"clientId": "string",
"clientSecret": "string",
"scope": [
"string"
],
"forcePKCE": True,
"additionalConfig": {}
}
],
"authorizationEndpoint": "string",
"authorizationEndpointQueryParams": {},
"tokenEndpoint": "string",
"tokenEndpointBodyParams": {},
"userInfoEndpoint": "string",
"userInfoEndpointQueryParams": {},
"userInfoEndpointHeaders": {},
"jwksURI": "string",
"oidcDiscoveryEndpoint": "string",
"requireEmail": True,
"userInfoMap": {
"fromIdTokenPayload": {
"userId": "string",
"email": "string",
"emailVerified": "string"
},
"fromUserInfoAPI": {
"userId": "string",
"email": "string",
"emailVerified": "string"
}
}
},
"skipValidation": False
},
)Response
{
"status": "OK",
"createdNew": true
}"string""Invalid API key""License Error""Not Found""Internal Error"