AUTH APIs
Here are all the available AUTH APIs for your project. You can also download them as a Postman collection from your project's API Docs page.
base_url
is equal to https://${project_id}.api.deskree.com/api/v1/
Sign up with email and password
POST
base_url/auth/accounts/signup
Sign up a user with email and password as credentials.
Headers
Content-type*
application/json
Request Body
email*
String
User email
password*
String
User password
{
"data": {
"uid": "g16bsf2DN9X3CbGN1osmAjpHlF83",
"email": "user@example.com",
"emailVerified": false,
"disabled": false,
"idToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjUwYTdhYTlkNzg5MmI1MmE4YzgxMzkwMzIzYzVjMjJlMTkwMzI1ZDgiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vZGVza3JlZS05ODg4ZDQwYy1jNWUzLTQzMDctOCIsImF1ZCI6ImRlc2tyZWUtOTg4OGQ0MGMtYzVlMy00MzA3LTgiLCJhdXRoX3RpbWUiOjE2NTcyMTI0MjEsInVzZXJfaWQiOiJnMTZic2YyRE45WDNDYkdOMW9zbUFqcEhsRjgzIiwic3ViIjoiZzE2YnNmMkROOVgzQ2JHTjFvc21BanBIbEY4MyIsImlhdCI6MTY1NzIxMjQyMSwiZXhwIjoxNjU3MjE2MDIxLCJlbWFpbCI6InVzZXJAZXhhbXBsZS5jb20iLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsImZpcmViYXNlIjp7ImlkZW50aXRpZXMiOnsiZW1haWwiOlsidXNlckBleGFtcGxlLmNvbSJdfSwic2lnbl9pbl9wcm92aWRlciI6InBhc3N3b3JkIn19.ch20lWIO6c26ZHi3Di1zPdGjfAQkndCKO-L17_lORswI6RY8sLrA8LHdkI1Tk73-fMpQJsEO5I9V_QYRToJ7GTRfc0lvgqCSxsWv8K9SQKg-rMfVKUcI9xASY3ol4ih-ezRXCcC0VtSb501iv161Vppa8fgmVd7qfHfO6efV50-ihPA_H6iGtpw-nejNdbuTAiBRd8VOjQApAeKp0Jr3sTS421u9eIlVPySllj4dyX-d5YReTLTGImN5noTs7yBQpj8rc63-TA3hS7BksSoXyHxcJVuKXS8DxeBJi_hmWTXXRFIfj938wnwMqBevmFzVbVTdpyjyP4RL0cISRXikBQ",
"refreshToken": "AIwUaOn0QXtzI0f_DbKca7QfoHnKhSlswIHoOuL5Hsrg-UGePN5aQID6giYWkvyMlLCk-67pVxNXC5yvoMuvhsTLab6FkSaCM2zK4vwxWplCAjMuTI_Ux7CVl3tTSexEjGd6NZQuNeKHYlI8zWPBLW4bvGtJ1Tc6NwpvIKRAi_ZNDl9Zcir0UDQQp_LPTuQu58F2ZIetfeG_oZB5rDbmo3F7uKOtsDihtywnZYHZm1C7E-Qp7GEWBc8",
"expiresIn": "3600"
}
}
{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "Please provide a valid email and password"
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
curl --location 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/signup' \
--header 'Content-Type: application/json' \
--data-raw '{"email":"user@example.com","password":"qwerty12345"}'
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"email": "user@example.com",
"password": "qwerty12345"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts/signup", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"email": "user@example.com",
"password": "qwerty12345"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/signup',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Sign in with email and password
POST
base_url/auth/accounts/sign-in/email
Sign in the user with email and password as credentials.
Headers
Content-Type*
String
application/json
Request Body
email*
String
User email
password*
String
User password
{
"data": {
"uid": "g16bsf2DN9X3CbGN1osmAjpHlF83",
"email": "user@example.com",
"emailVerified": false,
"disabled": false,
"idToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjUwYTdhYTlkNzg5MmI1MmE4YzgxMzkwMzIzYzVjMjJlMTkwMzI1ZDgiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vZGVza3JlZS05ODg4ZDQwYy1jNWUzLTQzMDctOCIsImF1ZCI6ImRlc2tyZWUtOTg4OGQ0MGMtYzVlMy00MzA3LTgiLCJhdXRoX3RpbWUiOjE2NTcyMTI0MjEsInVzZXJfaWQiOiJnMTZic2YyRE45WDNDYkdOMW9zbUFqcEhsRjgzIiwic3ViIjoiZzE2YnNmMkROOVgzQ2JHTjFvc21BanBIbEY4MyIsImlhdCI6MTY1NzIxMjQyMSwiZXhwIjoxNjU3MjE2MDIxLCJlbWFpbCI6InVzZXJAZXhhbXBsZS5jb20iLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsImZpcmViYXNlIjp7ImlkZW50aXRpZXMiOnsiZW1haWwiOlsidXNlckBleGFtcGxlLmNvbSJdfSwic2lnbl9pbl9wcm92aWRlciI6InBhc3N3b3JkIn19.ch20lWIO6c26ZHi3Di1zPdGjfAQkndCKO-L17_lORswI6RY8sLrA8LHdkI1Tk73-fMpQJsEO5I9V_QYRToJ7GTRfc0lvgqCSxsWv8K9SQKg-rMfVKUcI9xASY3ol4ih-ezRXCcC0VtSb501iv161Vppa8fgmVd7qfHfO6efV50-ihPA_H6iGtpw-nejNdbuTAiBRd8VOjQApAeKp0Jr3sTS421u9eIlVPySllj4dyX-d5YReTLTGImN5noTs7yBQpj8rc63-TA3hS7BksSoXyHxcJVuKXS8DxeBJi_hmWTXXRFIfj938wnwMqBevmFzVbVTdpyjyP4RL0cISRXikBQ",
"refreshToken": "AIwUaOn0QXtzI0f_DbKca7QfoHnKhSlswIHoOuL5Hsrg-UGePN5aQID6giYWkvyMlLCk-67pVxNXC5yvoMuvhsTLab6FkSaCM2zK4vwxWplCAjMuTI_Ux7CVl3tTSexEjGd6NZQuNeKHYlI8zWPBLW4bvGtJ1Tc6NwpvIKRAi_ZNDl9Zcir0UDQQp_LPTuQu58F2ZIetfeG_oZB5rDbmo3F7uKOtsDihtywnZYHZm1C7E-Qp7GEWBc8",
"expiresIn": "3600"
}
}
{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "Please provide a valid email and password"
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
curl --location 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/sign-in/email' \
--header 'Content-Type: application/json' \
--data-raw '{"email":"user@example.com","password":"qwerty12345"}'
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"email": "user@example.com",
"password": "qwerty12345"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts/sign-in/email", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"email": "user@example.com",
"password": "qwerty12345"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/sign-in/email',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Create URL for OAuth sign in
POST
base_url/auth/accounts/sign-in/auth-url
Creates URL for the user to sign in using OAuth
Headers
Content-Type*
String
application/json
Request Body
providerId*
String
google.com
, facebook.com
, or github.com
callBackUri*
String
{
"data": {
"authUri": "https://accounts.google.com/o/oauth2/auth?response_type=id_token&client_id=623213283749-0o0tto76nqu3ikn3as8eocdk41aag5tb.apps.googleusercontent.com&redirect_uri=http://localhost&state=AMbdmDlwnf12GgLWzl8ITv-AFHeyVLAiqXzE_9goszlPjO0QhOR8iTn5I6ZtdGNYCBCwhyJhI1diEoZgyDk7peY16selAeq4vmcDf2qClOt7ns_WqU1Gc07Cuymkyfqz60zFRhSHU1S_YumikZahR1nmv6WxQoxJyRlSyjYHY39G-fSCZN7itE9tA3WNO1j24TP9_t6hKFRfcc-8NYIbqRhitPOFjmUemtWUueWqUDDN5kv3b4fgnq5-elwRrDtQ74TX9v05Q8_AK4bDODVMOget-A&scope=openid+https://www.googleapis.com/auth/userinfo.email&nonce=b0fd25ce8f554880e9000d1bce463efeeeaa1f65332bf036bd3db3cef3c07400&include_profile=true",
"providerId": "google.com",
"sessionId": "Y31RHgVt30cTUZfbh3KYVTJbUT0"
}
}
{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "Please provide providerId and callBackUri"
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
{
"errors": [
{
"code": "400",
"title": "Bad Request",
"detail": "OPERATION_NOT_ALLOWED: The identity provider configuration is not found."
}
]
}
curl --location 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/sign-in/auth-url' \
--header 'Content-Type: application/json' \
--data '{"providerId":"google.com","callBackUri":"http://localhost"}'
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"providerId": "google.com",
"callBackUri": "http://localhost"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts/sign-in/auth-url", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"providerId": "google.com",
"callBackUri": "http://localhost"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/sign-in/auth-url',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Sign in with a selected OAuth provider
POST
base_url/auth/accounts/sign-in/idp
Sign in the user with the selected OAuth provider
Headers
Content-Type*
String
application/json
Request Body
token
String
Used only for Google and Facebook sign-in.
If the token is provided, code
parameter is ignored.
code
String
callBackUri*
String
URL to redirect users after a successful OAUTH sign-in.
sessionId*
String
providerId*
String
google.com
, facebook.com
, or github.com
{
"data": {
"providerId": "google.com",
"localId": "a9nsiasjdi1d9wd1dwm9w1wd",
"emailVerified": true,
"email": "example@example.org",
"rawUserInfo": "",
"firstName": "Johnathan",
"lastName": "Doe",
"fullName": "Johnathan Doe",
"displayName": "John Doe",
"photoUrl": ""
"idToken": "eyJahbGciOiJSUzI1NiIsImtpZCI6IjUwYTdhYTlkNzg5MmI1MmE4YzgxMzkwMzIzYzVjMjJlMTkwMzI1ZDgiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vZGVza3JlZS1mYzY3ODUyYy1jYTRlLTQ4MTQtYSIsImF1ZCI6ImRlc2tyZWUtZmM2Nzg1MmMtY2E0ZS00ODE0LWEiLCJhdXRoX3RpbWUiOjE2NTc1NTc2MzEsInVzZXJfaWQiOiJpOVhVWEo1QXJEUFlHeTkwc0VYdU5LVWliaEczIiwic3ViIjoiaTlYVVhKNUFyRFBZR3k5MHNFWHVOS1VpYmhHMyIsImlhdCI6MTY1NzU2NzA3MiwiZXhwIjoxNjU3NTcwNjcyLCJlbWFpbCI6ImJpbWV4aXM0NjNAbGV1cHVzLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiZmlyZWJhc2UiOnsiaWRlbnRpdGllcyI6eyJlbWFpbCI6WyJiaW1leGlzNDYzQGxldXB1cy5jb20iXX0sInNpZ25faW5fcHJvdmlkZXIiOiJwYXNzd29yZCJ9fQ.noxnUOenJmxaGbm9gKq_tZQoWAPwvRDEKpxHJ3gLfd-mzWWs3AqHXlqYvtV7jtlJDIuHisTk5MQeugRiUjVaN0RHuraFMO9gSpuv4-7roIjVRpp7GoFPHRjdzge8WMBM-obtsDC-D1QhjvCXqXcvmbcFS2ej1zbHDvANncOQckXxGdT0dFHIiZGWmUqMnUxKpWuiYhsci7Odf7TWiKUPFuGrzCBV2QbA8veAklNdIAHmbAvwFFnJtl8A4FsOYbwpmr-TB3RFBWBo1SzZUzyzLb4ffbV4k5Monkp3i1mqRphByLiynrkKohPa0sLun2jjbXRHK6iPQOKPYaFNHaxbDQ"
"refreshToken": "AIwUaOn0QXtzI0f_DbKca7QfoHnKhSlswIHoOuL5Hsrg-UGePN5aQID6giYWkvyMlLCk-67pVxNXC5yvoMuvhsTLab6FkSaCM2zK4vwxWplCAjMuTI_Ux7CVl3tTSexEjGd6NZQuNeKHYlI8zWPBLW4bvGtJ1Tc6NwpvIKRAi_ZNDl9Zcir0UDQQp_LPTuQu58F2ZIetfeG_oZB5rDbmo3F7uKOtsDihtywnZYHZm1C7E-Qp7GEWBc8",
"expiresIn": "3600",
"needConfirmation": true
}
}
{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "Please provide sessionId, providerId, callBackUri, and either token or code"
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
curl --location 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/sign-in/idp' \
--header 'Content-Type: application/json' \
--data '{"sessionId":"kasdoa0123-012sdasd","providerId":"google.com","callBackUri":"http://localhost","token":"asdkpasd","code":"0aksd09d0jd091ij0"}'
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"sessionId": "kasdoa0123-012sdasd",
"providerId": "google.com",
"callBackUri": "http://localhost",
"token": "asdkpasd",
"code": "0aksd09d0jd091ij0"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts/sign-in/idp", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"sessionId": "kasdoa0123-012sdasd",
"providerId": "google.com",
"callBackUri": "http://localhost",
"token": "asdkpasd",
"code": "0aksd09d0jd091ij0"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/sign-in/idp',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Reset password
POST
base_url/auth/accounts/password-reset
Endpoint to reset the user password. The user will receive an email prompting him to change the existing password by following a URL. Note that you need to have a reset password URL specified in authentication settings in order for this endpoint to work.
Headers
Content-Type*
String
application/json
Request Body
email*
String
User email
{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "No email address provided"
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
{
"data": true
}
curl --location 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/password-reset' \
--header 'Content-Type: application/json' \
--data-raw '{"email":"example@example.com"}'
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"email": "example@example.com"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts/password-reset", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"email": "example@example.com"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/password-reset',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Invite user
POST
base_url/auth/accounts/invite
Send an invite to a user via email. The system will first create a user in a disabled state until the invite is accepted via a link to be sent to the provided email.
Headers
Content-Type*
String
application/json
Request Body
email*
String
User email
{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "The email address is already in use by another account."
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
{
"data": {
"uid": "72cRcubQ7INiFoxoBRJaJlSpq0C2",
"inviteAccepted": false,
"emailVerified": false,
"disabled": true
}
}
curl --location 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/invite' \
--header 'Content-Type: application/json' \
--data-raw '{"email":"example@example.com"}'
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"email": "example@example.com"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts/invite", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"email": "example@example.com"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/invite',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Verify invite
POST
base_url/auth/accounts/verify/invite
Endpoint to verify invitation based on oobCode
and uid
provided in the email sent to the user. The oobCode
and uid
are found in the password reset URL. Password reset URL has the following structure: {email_conf_url}?oobCode={oobCode}&uid={uid}
.
Headers
Content-Type*
String
application/json
Request Body
oobCode*
String
uid*
String
User UID
newPassword*
String
Password set by the invited user
{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "No newPassword, uid, or oobCode provided"
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
{
"data": {
"uid": "72cRcubQ7INiFoxoBRJaJlSpq0C2",
"inviteAccepted": true,
"emailVerified": true,
"disabled": false
}
}
curl --location 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/verify/invite' \
--header 'Content-Type: application/json' \
--data '{"oobCode":"na9uubnkloaf9n18n9u112u41","newPassword":"qwerty12345","uid":"0193j401nd18en18dj1nm29dn8nuk"}'
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"oobCode": "na9uubnkloaf9n18n9u112u41",
"newPassword": "qwerty12345",
"uid": "0193j401nd18en18dj1nm29dn8nuk"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts/verify/invite", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"oobCode": "na9uubnkloaf9n18n9u112u41",
"newPassword": "qwerty12345",
"uid": "0193j401nd18en18dj1nm29dn8nuk"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/verify/invite',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Verify password reset
POST
base_url/auth/accounts/verify/password-reset
Endpoint to verify password reset request based on oobCode
provided in the email sent to the user. The oobCode
can be found in the password reset URL. Password reset URL has the following structure: {email_conf_url}?oobCode={oobCode}
Headers
Content-Type*
String
application/json
Request Body
oobCode*
String
newPassword*
String
New password for the user
{
"errors": [
{
"code": "400",
"title": "Bad Request",
"detail": "INVALID_OOB_CODE"
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
{
"data": true
}
curl --location 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/verify/password-reset' \
--header 'Content-Type: application/json' \
--data '{"oobCode":"na9uubnkloaf9n18n9u112u41","newPassword":"qwerty12345"}'
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"oobCode": "na9uubnkloaf9n18n9u112u41",
"newPassword": "qwerty12345"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts/verify/password-reset", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"oobCode": "na9uubnkloaf9n18n9u112u41",
"newPassword": "qwerty12345"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/verify/password-reset',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Verify email
POST
base_url/auth/accounts/verify/email
Endpoint to verify the email based on oobCode
and uid
provided in the email sent to the user. The oobCode
and uid
are found in the email verification URL. Email verification URL has the following structure: {email_conf_url}?oobCode={oobCode}&uid={uid}.
Headers
Content-Type*
String
application/json
Request Body
email*
String
User email
{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "There is no user record corresponding to the provided identifier."
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
{
"data": true
}
curl --location 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/verify/email' \
--header 'Content-Type: application/json' \
--data '{"oobCode":"na9uubnkloaf9n18n9u112u41","uid":"0193j401nd18en18dj1nm29dn8nuk"}'
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"oobCode": "na9uubnkloaf9n18n9u112u41",
"uid": "0193j401nd18en18dj1nm29dn8nuk"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts/verify/email", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"oobCode": "na9uubnkloaf9n18n9u112u41",
"uid": "0193j401nd18en18dj1nm29dn8nuk"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/verify/email',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Update email
POST
base_url/auth/accounts/update-email
Update the user email.
Headers
Content-Type*
String
application/json
x-authorization*
String
a valid idToken of the registered user
Request Body
email*
String
User email
{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "Please provide a valid email and password"
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
{
"data": true
}
curl --location 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/update-email' \
--header 'x-authorization: Bearer ${idToken}' \
--header 'Content-Type: application/json' \
--data-raw '{"email":"example@example.com"}'
var myHeaders = new Headers();
myHeaders.append("x-authorization", "Bearer ${idToken}");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"email": "example@example.com"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts/update-email", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"email": "example@example.com"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/update-email',
headers: {
'x-authorization': 'Bearer ${idToken}',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Update password
POST
base_url/auth/accounts/update-password
Update the user password.
Headers
Content-Type*
String
application/json
x-authorization*
String
a valid idToken of the registered user
Request Body
oldPassword*
String
old users password
newPassword*
String
new user password
{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "Please provide a valid email and password"
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
{
"data": {
"uid": "72cRcuaQ7INiFoxoBRJgJlSpq0C2",
"email": "email@email.com",
"emailVerified": true,
"disabled": false
}
}
curl --location 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/update-password' \
--header 'x-authorization: Bearer ${idToken}' \
--header 'Content-Type: application/json' \
--data '{"oldPassword":"qwerty12345","newPassword":"not_qwerty12345"}'
var myHeaders = new Headers();
myHeaders.append("x-authorization", "Bearer ${idToken}");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"oldPassword": "qwerty12345",
"newPassword": "not_qwerty12345"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts/update-password", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"oldPassword": "qwerty12345",
"newPassword": "not_qwerty12345"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/update-password',
headers: {
'x-authorization': 'Bearer ${idToken}',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Fetch email providers
POST
base_url/auth/accounts/email-providers
Get a list of authentication providers for the given email.
Headers
Content-Type*
String
application/json
Request Body
email*
String
User email
{
"data": {
"kind": "identitytoolkit#CreateAuthUriResponse",
"allProviders": [
"password"
],
"registered": true,
"sessionId": "MjzipXZkgtj5IUddfspnsVJowq3AM",
"signinMethods": [
"password"
]
}
}
{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "No email provided"
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
Sign up a user with email and password as credentials.
User email
User password
{
"data": {
"uid": "g16bsf2DN9X3CbGN1osmAjpHlF83",
"email": "user@example.com",
"emailVerified": false,
"disabled": false,
"idToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjUwYTdhYTlkNzg5MmI1MmE4YzgxMzkwMzIzYzVjMjJlMTkwMzI1ZDgiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vZGVza3JlZS05ODg4ZDQwYy1jNWUzLTQzMDctOCIsImF1ZCI6ImRlc2tyZWUtOTg4OGQ0MGMtYzVlMy00MzA3LTgiLCJhdXRoX3RpbWUiOjE2NTcyMTI0MjEsInVzZXJfaWQiOiJnMTZic2YyRE45WDNDYkdOMW9zbUFqcEhsRjgzIiwic3ViIjoiZzE2YnNmMkROOVgzQ2JHTjFvc21BanBIbEY4MyIsImlhdCI6MTY1NzIxMjQyMSwiZXhwIjoxNjU3MjE2MDIxLCJlbWFpbCI6InVzZXJAZXhhbXBsZS5jb20iLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsImZpcmViYXNlIjp7ImlkZW50aXRpZXMiOnsiZW1haWwiOlsidXNlckBleGFtcGxlLmNvbSJdfSwic2lnbl9pbl9wcm92aWRlciI6InBhc3N3b3JkIn19.ch20lWIO6c26ZHi3Di1zPdGjfAQkndCKO-L17_lORswI6RY8sLrA8LHdkI1Tk73-fMpQJsEO5I9V_QYRToJ7GTRfc0lvgqCSxsWv8K9SQKg-rMfVKUcI9xASY3ol4ih-ezRXCcC0VtSb501iv161Vppa8fgmVd7qfHfO6efV50-ihPA_H6iGtpw-nejNdbuTAiBRd8VOjQApAeKp0Jr3sTS421u9eIlVPySllj4dyX-d5YReTLTGImN5noTs7yBQpj8rc63-TA3hS7BksSoXyHxcJVuKXS8DxeBJi_hmWTXXRFIfj938wnwMqBevmFzVbVTdpyjyP4RL0cISRXikBQ",
"refreshToken": "AIwUaOn0QXtzI0f_DbKca7QfoHnKhSlswIHoOuL5Hsrg-UGePN5aQID6giYWkvyMlLCk-67pVxNXC5yvoMuvhsTLab6FkSaCM2zK4vwxWplCAjMuTI_Ux7CVl3tTSexEjGd6NZQuNeKHYlI8zWPBLW4bvGtJ1Tc6NwpvIKRAi_ZNDl9Zcir0UDQQp_LPTuQu58F2ZIetfeG_oZB5rDbmo3F7uKOtsDihtywnZYHZm1C7E-Qp7GEWBc8",
"expiresIn": "3600"
}
}
application/json
{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "Please provide a valid email and password"
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
}
curl --location 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/email-providers' \
--header 'Content-Type: application/json' \
--data-raw '{"email":"example@example.com"}'
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"email": "example@example.com"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts/email-providers", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"email": "example@example.com"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/email-providers',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Exchange refreshToken for idToken
POST
base_url/auth/accounts/token/refresh
Exchange refreshToken
for idToken
Headers
Content-Type*
String
application/json
Request Body
refresh_token*
String
Refresh token obtained from any sign-up or sign-in methods
{
"data": {
"access_token": "eyJhbGciOiJSUdrrfghj36IjdjZjdmODcyNzA5MWU0Yzc3YWE5OTVkYjYwNzQzYjdkZDJiYjcwYjUiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vZGVza3JlZS02MTExYmU1ZS0xYWRhLTQzODYtOCIsImF1ZCI6ImRlc2tyZWUtNjExMWJlNWUtMWFkYS00Mzg2LTgiLCJhdXRoX3RpbWUiOjE3MDUzNTEwNTUsInVzZXJfaWQiOiJZTkpzZEJOd1FqU2tpSjh4cjhQS3VBdGpqWUMyIiwic3ViIjoiWU5Kc2RCTndRalNraUo4eHI4UEt1QXRqallDMiIsImlhdCI6MTcwNTM1MTA3NSwiZXhwIjoxNzA1MzU0Njc1LCJlbWFpbCI6InVzZXJAZXhhbXBsZS5jb20iLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsImZpcmViYXNlIjp7ImlkZW50aXRpZXMiOnsiZW1haWwiOlsidXNlckBleGFtcGxlLmNvbSJdfSwic2lnbl9pbl9wcm92aWRlciI6InBhc3N3b3JkIn19.Rf0hI0Z-KAKpCHVQ81TC4ByQnPje31tqAfpXgWvzh29PkqiLmQpZRmqLKiKTzdiEH0a_x2QGJ_16Y15F9W7zm_ay5ddddsHwbhUug9bp6kQ-RY4FArKlzPe3BXQa333ntIgMGKP5OwuTJ5E3R0uKY95ZttpJhJ1X2fVKZXKenTwSuOGkZPunzu815dbzJ6N8fK2pCsILfhOXOEpRZE0Pk5B6Y1f7JCDfXUrsEwKcHKOKiKM9S6A4oyPVoaCqD7B6a6aFGareKUakop8E-N15uHoAsa3TDAyG1VkXyGt4i_1TAqfxj3JFQffY9rFMyLtMNHpMHFDYXD4vmhMGQ",
"expires_in": "3600",
"token_type": "Bearer",
"refresh_token": "AMf-vBzJ7wlRsdsds4vDcmFJQNS3SO_D4oJvHU2PRSl8I7vNxycYpbIP3YRbwv-rRVw92DFp-EHHrGBsJNkRXTwZ3qrt0Uzmjeb6ZZzoxf7KYTTdR_HAQNFXn6_lqPLrMr8wNqxlHlWSIf-UzPYYvGnOuHTHqHmFtChWUj_caIPLtfhog0U95D9LwzSej02yrCw2IwH3DacvX8GW7Zo2QuI2_qgVYrVL4mQuWA8ngLODNg7t7rM4",
"id_token": "eyJhbGciOiJSUzddsImtpZCI6IjdjZjdmODcyNzA5MWU0Yzc3YWE5OTVkYjYwNzQzYjdkZDJiYjcwYjUiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vZGVza3JlZS02MTExYmU1ZS0xYWRhLTQzODYtOCIsImF1ZCI6ImRlc2tyZWUtNjExMWJlNWUtMWFkYS00Mzg2LTgiLCJhdXRoX3RpbWUiOjE3MDUzNTEwNTUsInVzZXJfaWQiOiJZTkpzZEJOd1FqU2tpSjh4cjhQS3VBdGpqWUMyIiwic3ViIjoiWU5Kc2RCTndRalNraUo4eHI4UEt1QXRqallDMiIsImlhdCI6MTcwNTM1MTA3NSwiZXhwIjoxNzA1MzU0Njc1LCJlbWFpbCI6InVzZXJAZXhhbXBsZS5jb20iLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsImZpcmViYXNlIjp7ImlkZW50aXRpZXMiOnsiZW1haWwiOlsidXNlckBleGFtcGxlLmNvbSJdfSwic2lnbl9pbl9wcm92aWRlciI6InBhc3N3b3JkIn19.Rf0hI0Z-KAKpCHVQ81TC4ByQnPje31tqAfpXgWvzh29PkqiLmQpZRmqLKiKTzdiEH0a_x2QGJ_16Y15F9W7zm_ay5Ov6P5f7YTcHwbhUug9bp6kQ-RY4dddzPe3BXQa333ntIgMGKP5OwuTJ5E3R0uKY95ZttpJhJ1X2fVKZXKenTwSuOGkZPunzu815dbzJ6N8fK2pCsILfhOXOEpRZE0Pk5B6Y1f7JCDfXUrsEwKcHKOKiKM9S6A4oyPVoaCqD7B6a6aFGareKUakop8E-N15uHoAsa3TDAyG1VkXyGt4i_1TAqfxj3JFQffY9rFMyLtMNHpMHFDYXD4vmhMGQ",
"user_id": "YNJsdBNwQjSkiJ8xdPKuAtjjYC2"
}
}
{
"errors": [
{
"code": "422",
"title": "Unprocessable Entity",
"detail": "No refresh token provided"
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
curl --location 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/token/refresh' \
--header 'Content-Type: application/json' \
--data '{"refresh_token":"md19hnw191dbn1w0d1-asdwdin1"}'
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"refresh_token": "md19hnw191dbn1w0d1-asdwdin1"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts/token/refresh", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"refresh_token": "md19hnw191dbn1w0d1-asdwdin1"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/token/refresh',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Delete account
DELETE
base_url/auth/accounts
Delete the account based on the Bearer token. The system will also delete the corresponding user object inside the Users table.
Headers
Content-Type*
String
application/json
x-authorization*
String
a valid idToken of the registered user
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
{
"data": true
}
curl --location --request DELETE 'https://${project_id}.api.deskree.com/api/v1/auth/accounts' \
--header 'x-authorization: Bearer ${idToken}'
var myHeaders = new Headers();
myHeaders.append("x-authorization", "Bearer ${idToken}");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let config = {
method: 'delete',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts',
headers: {
'x-authorization': 'Bearer ${idToken}'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Get roles
GET
base_url/auth/accounts/roles
Delete the account based on the Bearer token. The system will also delete the corresponding user object inside the Users table.
Headers
Content-Type*
String
application/json
deskree-admin*
String
{
"data": [
{
"uid": "njiasd91n2mkoaskmoadsko",
"name": "admin"
}
]
}
{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "Error processing your request"
}
]
}
curl --location 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/roles' \
--header 'deskree-admin: ${deskree-admin-token}'
var myHeaders = new Headers();
myHeaders.append("deskree-admin", "${deskree-admin-token}");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://${project_id}.api.deskree.com/api/v1/auth/accounts/roles", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://${project_id}.api.deskree.com/api/v1/auth/accounts/roles',
headers: {
'deskree-admin': '${deskree-admin-token}'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Last updated