Challenges
Post users challenges
Create a new challenge to verify a login identifier
POST
/
users
/
{userID}
/
challenges
Copy
curl --request POST \
--url https://backendapi.corbado.io/v2/users/{userID}/challenges \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"challengeType": "email_otp",
"identifierValue": "<string>",
"challengeMetadata": {},
"lifetimeSeconds": 123,
"clientInformation": {
"remoteAddress": "::ffff:172.18.0.1",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
"clientEnvHandle": "<string>",
"javascriptFingerprint": "<string>",
"javaScriptHighEntropy": {
"platform": "<string>",
"platformVersion": "<string>",
"mobile": true
},
"bluetoothAvailable": true,
"passwordManagerAvailable": true,
"userVerifyingPlatformAuthenticatorAvailable": true,
"conditionalMediationAvailable": true,
"privateMode": true,
"parsedDeviceInfo": {
"browserName": "<string>",
"browserVersion": "<string>",
"osName": "<string>",
"osVersion": "<string>"
}
}
}'
Copy
{
"challengeID": "<string>",
"type": "email_otp",
"identifierValue": "<string>",
"value": "<string>",
"expires": 123,
"status": "pending"
}
Authorizations
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Path Parameters
ID of user
Body
application/json
Response
200
application/json
Challenge has been created
The response is of type object
.
Was this page helpful?
Copy
curl --request POST \
--url https://backendapi.corbado.io/v2/users/{userID}/challenges \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"challengeType": "email_otp",
"identifierValue": "<string>",
"challengeMetadata": {},
"lifetimeSeconds": 123,
"clientInformation": {
"remoteAddress": "::ffff:172.18.0.1",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
"clientEnvHandle": "<string>",
"javascriptFingerprint": "<string>",
"javaScriptHighEntropy": {
"platform": "<string>",
"platformVersion": "<string>",
"mobile": true
},
"bluetoothAvailable": true,
"passwordManagerAvailable": true,
"userVerifyingPlatformAuthenticatorAvailable": true,
"conditionalMediationAvailable": true,
"privateMode": true,
"parsedDeviceInfo": {
"browserName": "<string>",
"browserVersion": "<string>",
"osName": "<string>",
"osVersion": "<string>"
}
}
}'
Copy
{
"challengeID": "<string>",
"type": "email_otp",
"identifierValue": "<string>",
"value": "<string>",
"expires": 123,
"status": "pending"
}
Assistant
Responses are generated using AI and may contain mistakes.