var myHeaders =newHeaders();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));
constaxios=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
POSTbase_url/auth/accounts/sign-in/auth-url
Creates URL for the user to sign in using OAuth
Headers
Name
Type
Description
Content-Type*
String
application/json
Request Body
Name
Type
Description
providerId*
String
google.com, facebook.com, or github.com
callBackUri*
String
URL where the request will be redirected to after successful OAUTH sign-in.
Note: for most OAUTH providers the redirect URL must be specified in the app settings.
Examples: Google, Facebook, GitHub
var myHeaders =newHeaders();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));
constaxios=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
POSTbase_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.
var myHeaders =newHeaders();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));
constaxios=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
POSTbase_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
Name
Type
Description
Content-Type*
String
application/json
Request Body
Name
Type
Description
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" } ]}
var myHeaders =newHeaders();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));
constaxios=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
POSTbase_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
Name
Type
Description
Content-Type*
String
application/json
Request Body
Name
Type
Description
oobCode*
String
Can be found in the URL sent to the user by the Invite usermethod
var myHeaders =newHeaders();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));
constaxios=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
POSTbase_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
Name
Type
Description
Content-Type*
String
application/json
Request Body
Name
Type
Description
oobCode*
String
Can be found in the URL sent to the user by the Reset password method.
var myHeaders =newHeaders();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));
constaxios=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
POSTbase_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
Name
Type
Description
Content-Type*
String
application/json
Request Body
Name
Type
Description
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" } ]}
{"errors": [ {"code":"500","title":"Internal Server Error","detail":"Error processing your request" } ]Sign up a user with email and password ascredentials.User emailUser 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" } ]}}