Handle user password change after getting the otp code
POST
/users/reset-password
curl \
-X POST http://localhost:3003/api/dev/users/reset-password \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"email":"mohamedhassen.jahha@assistdigital.com","code":"855586","newPassword":"p8\u0026Q4f7B","confirmPassword":"p8\u0026Q4f7B"}'
Request example
{
"email": "mohamedhassen.jahha@assistdigital.com",
"code": "855586",
"newPassword": "p8&Q4f7B",
"confirmPassword": "p8&Q4f7B"
}
Request examples
{
"code": "855586",
"email": "mohamedhassen.jahha@assistdigital.com",
"newPassword": "p8&Q4f7B",
"confirmPassword": "p8&Q4f7B"
}
Response examples (200)
# Headers
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-Policy: same-origin
Origin-Agent-Cluster: ?1
Referrer-Policy: no-referrer
Strict-Transport-Security: max-age=15552000; includeSubDomains
X-Content-Type-Options: nosniff
X-DNS-Prefetch-Control: off
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Retry-After: 277.377
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 92
X-RateLimit-Reset: Sun Oct 29 2023 14:47:36 GMT+0100 (Central European Standard Time)
x-powered-by: TUNISIAN RED CRESSCENT
Content-Type: application/json; charset=utf-8
Content-Length: 139
ETag: W/"8b-QWbb4ikgHnVP7+uS012NuEdlw3U"
Date: Sun, 29 Oct 2023 13:43:10 GMT
Connection: keep-alive
Keep-Alive: timeout=5
# Payload
{
"code": 200,
"message": {
"RESPONSE_TEXT": "Le mot de passe a été modifié avec succès",
"RESPONSE_CODE": "PASSWORD_CHANGED_SUCCESS_MESSAGE"
}
}
Response examples (200)
# Headers
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-Policy: same-origin
Origin-Agent-Cluster: ?1
Referrer-Policy: no-referrer
Strict-Transport-Security: max-age=15552000; includeSubDomains
X-Content-Type-Options: nosniff
X-DNS-Prefetch-Control: off
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Retry-After: 277.377
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 92
X-RateLimit-Reset: Sun Oct 29 2023 14:47:36 GMT+0100 (Central European Standard Time)
x-powered-by: TUNISIAN RED CRESSCENT
Content-Type: application/json; charset=utf-8
Content-Length: 139
ETag: W/"8b-QWbb4ikgHnVP7+uS012NuEdlw3U"
Date: Sun, 29 Oct 2023 13:43:10 GMT
Connection: keep-alive
Keep-Alive: timeout=5
# Payload
{}
Response examples (400)
# Headers
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-Policy: same-origin
Origin-Agent-Cluster: ?1
Referrer-Policy: no-referrer
Strict-Transport-Security: max-age=15552000; includeSubDomains
X-Content-Type-Options: nosniff
X-DNS-Prefetch-Control: off
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Retry-After: 550.378
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 97
X-RateLimit-Reset: Mon Oct 30 2023 02:46:38 GMT+0100 (Central European Standard Time)
x-powered-by: TUNISIAN RED CRESSCENT
Content-Type: application/json; charset=utf-8
Content-Length: 147
ETag: W/"93-6UHZMLYGXITZXJnJ57HXZyXwtew"
Date: Mon, 30 Oct 2023 01:37:27 GMT
Connection: keep-alive
Keep-Alive: timeout=5
# Payload
{
"code": 400,
"message": {
"RESPONSE_TEXT": "Oups! Il semblerait que vos identifiants soient incorrect",
"RESPONSE_CODE": "BAD_AUTH_COMBINATION_MESSAGE"
}
}
Response examples (400)
# Headers
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-Policy: same-origin
Origin-Agent-Cluster: ?1
Referrer-Policy: no-referrer
Strict-Transport-Security: max-age=15552000; includeSubDomains
X-Content-Type-Options: nosniff
X-DNS-Prefetch-Control: off
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Retry-After: 550.378
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 97
X-RateLimit-Reset: Mon Oct 30 2023 02:46:38 GMT+0100 (Central European Standard Time)
x-powered-by: TUNISIAN RED CRESSCENT
Content-Type: application/json; charset=utf-8
Content-Length: 147
ETag: W/"93-6UHZMLYGXITZXJnJ57HXZyXwtew"
Date: Mon, 30 Oct 2023 01:37:27 GMT
Connection: keep-alive
Keep-Alive: timeout=5
# Payload
{}