Skip to content
Esc
navigateopen⌘Jpreview
Dashboard

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:

  • clients list:
    • 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:
    • clientId must 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:
      • clientSecret must be empty or undefined
      • additionalConfig should contain the following keys:
        • keyId must be a non empty string
        • teamId must be a non empty string
        • privateKey must be a non empty string

Google Workspaces (id: google-workspaces):

  • clients
    • if it contains elements, each of them are validated as follows:
      • additionalConfig may contain the key hd
        • hd is optional
        • if specified, it must be either "*", or a valid domain

Boxy SAML (id: boxy-saml):

  • clients
    • additionalConfig in the each element must contain boxyURL and must be non-empty string
PUT/appid-{appId}/{tenantId}/recipe/multitenancy/config/thirdparty
Authorization
api-keyAPI key · headerrequired
The 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
tenantIdstring
The tenant against which the request is made. If left empty, the default tenant will be used.
Header parameters
ridstring
cdi-versionstring
X.Y of the X.Y.Z CDI version.
Request body
application/json
configthirdPartyProviderConfigrequired
Show properties
thirdPartyIdstringrequired
namestring
clientsobject[]
Show properties
Array of object
clientTypestring
clientIdstring
clientSecretstring
scopestring[]
forcePKCEboolean
additionalConfigobject
authorizationEndpointstring
authorizationEndpointQueryParamsobject
tokenEndpointstring
tokenEndpointBodyParamsobject
userInfoEndpointstring
userInfoEndpointQueryParamsobject
userInfoEndpointHeadersobject
jwksURIstring
oidcDiscoveryEndpointstring
requireEmailboolean
default: true
userInfoMapobject
Show properties
fromIdTokenPayloadobject
Show properties
userIdstring
emailstring
emailVerifiedstring
fromUserInfoAPIobject
Show properties
userIdstring
emailstring
emailVerifiedstring
skipValidationboolean
Responses
200Create or Update result
One of:
object
statusstatusOKrequired
Allowed:OK
createdNewbooleanrequired
object
statusstringrequired
Allowed:CONFIG_VALIDATION_ERROR
reasonstringrequired
400error code 400
string
401error code 401
string
402error code 402
string
404error code 404
string
500error code 500
string
Try 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
}'
Response
{
  "status": "OK",
  "createdNew": true
}

API reference

API schema and response details