Sign in/up third party user
Signin/up a user
POST
/appid-{appId}/{tenantId}/recipe/signinupAuthorization
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/jsonthirdPartyIdthirdPartyIdthirdPartyUserIdthirdPartyUserIdemailthirdPartyEmailShow propertiesHide properties
idemailisVerifiedisVerifiedResponses
200Signin/up a user
One of:
object
statusstatusOKAllowed:
OKcreatedNewUserbooleanuserauthRecipeUserShow propertiesHide properties
iduserIdisPrimaryUserbooleantenantIdstenantId[]timeJoinedtimeJoinedemailsemail[]phoneNumbersphoneNumber[]thirdPartyobject[]Show propertiesHide properties
Array of
objectidthirdPartyIduserIdthirdPartyUserIdloginMethodsobject[]Show propertiesHide properties
Array of
objecttenantIdstenantId[]recipeUserIduserIdverifiedbooleantimeJoinedtimeJoinedrecipeIdrecipeIdAllowed:
emailpasswordpasswordlessthirdpartyemailemailphoneNumberphoneNumberthirdPartyobjectShow propertiesHide properties
idthirdPartyIduserIdthirdPartyUserIdrecipeUserIduserIdobject
statusstringAllowed:
EMAIL_CHANGE_NOT_ALLOWED_ERRORreasonstring400error code 400
string401error code 401
string404error code 404
string500error code 500
stringTry it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "/appid-{appId}/public/recipe/signinup" \
-H "api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"thirdPartyId": "google",
"thirdPartyUserId": 106347997792363870000,
"email": {
"id": "[email protected]",
"isVerified": true
}
}'const response = await fetch("/appid-{appId}/public/recipe/signinup", {
method: "POST",
headers: {
"api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"thirdPartyId": "google",
"thirdPartyUserId": 106347997792363870000,
"email": {
"id": "[email protected]",
"isVerified": true
}
})
});import requests
response = requests.post(
"/appid-{appId}/public/recipe/signinup",
headers={
"api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"thirdPartyId": "google",
"thirdPartyUserId": 106347997792363870000,
"email": {
"id": "[email protected]",
"isVerified": True
}
},
)Response
{
"status": "OK",
"createdNewUser": true,
"user": {
"id": "fa7a0841-b533-4478-95533-0fde890c3483",
"isPrimaryUser": true,
"tenantIds": [
"customer1"
],
"timeJoined": 1623918032231,
"emails": [
"[email protected]"
],
"phoneNumbers": [
"+14155552671"
],
"thirdParty": [
{
"id": "google",
"userId": 106347997792363870000
}
],
"loginMethods": [
{
"tenantIds": [
"customer1"
],
"recipeUserId": "fa7a0841-b533-4478-95533-0fde890c3483",
"verified": true,
"timeJoined": 1623918032231,
"recipeId": "emailpassword",
"email": "[email protected]",
"phoneNumber": "+14155552671",
"thirdParty": {
"id": "google",
"userId": 106347997792363870000
}
}
]
},
"recipeUserId": "fa7a0841-b533-4478-95533-0fde890c3483"
}"string""Invalid API key""Not Found""Internal Error"