POST
https://api.sfox.com/v1/enterprise/users/send-verification/:user_id
Request an email or sms verification code for your user.
Request
Path Parameters
Unique ID defined by you for this user that will serve as the shared identifier for this account between you and sFOX
Body Parameters
Verification method. Possible values:
Responses
200: OK
The following is an example response body to request an email verification code
{
"data": {
"user_id": "client_account_1",
"type": "email",
"email": "sfox_connect@email.com"
}
}
{
"data": {
"user_id": "client_account_1",
"type": "sms",
"email": "+12223334444"
}
}
Example Requests
curl -X POST \
-H "Authorization: Bearer ${ENTERPRISE_API_TOKEN}" \
--data '{ "type": "email" }' \
'https://api.sfox.com/v1/enterprise/users/send-verification/user_id'
const axios = require('axios');
const user_id = "user_id"
const data = JSON.stringify({ type: 'email'})
const config = {
method: 'post',
url: `https://api.sfox.com/v1/enterprise/users/send-verification/${user_id}`,
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${process.env.ENTERPRISE_API_KEY}`
},
data: data
}
axios(config)
.then((response) => {
console.log(response.status)
console.log(response.data)
})
.catch((err) => {
console.error(err.response.status)
console.error(err.response.data)
});
import requests
import os
data = requests.post(
"https://api.sfox.com/v1/enterprise/users/send-verification/connect_account_1",
headers={
"Authorization": f"Bearer {os.environ['ENTERPRISE_API_KEY']}"
},
json={
"type": "email"
}
)
print(data.status_code)
print(data.json())
Last updated