Skip to main content

Password

info

Don't worry when you forgot your password. we provide api help you get password.

forgot password

send confirmation email to you, and you going to get opt code. and then you submit otp code in here and change your password

parameters

  • email: required
    • Type: string
    • Validate: email input must be valid
  • role: required
    • Type: string
    • validate: one of those role: Customer, Agent, Admin...

code sample

curl --location --request POST 'https://api-v1-stg.lumyri.com/auth/forgot-password' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "customer@exaamle.com",
"role": "Customer"
}'

response

{
"key": "oauth_otp_c91e6a31-8761-4baa-8a6f-4ba72de8ff71"
}

otp submit

parameters

  • key: required
    • Type: string
    • description: receive from forgot password response
  • otp: required
    • Type: string
    • validate: one of those role: Customer, Agent, Admin..
    • description: receive from confirmation email

code sample

curl --location -g --request POST 'https://api-v1-stg.lumyri.com/auth/otp-submit' \
--data-raw '{
"key": "oauth_otp_c91e6a31-8761-4baa-8a6f-4ba72de8ff71",
"otp": "279460"
}'

response

{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJEa3lUWXpkVHdGV0p5S0tKTzFCMmwyd1RuME5Mbml1ZCIsInVzZXJfaWQiOiJjOTFlNmEzMS04NzYxLTRiYWEtOGE2Zi00YmE3MmRlOGZmNzEifQ.c7ot8GvU_JL6HuW0JvKSdrFxFl-m2I7BUJ7TWmSOi2M"
}

Change password

Parameter

  • current_password: require
  • new_password: require

code example

curl --location --request PUT 'https://api-v1-stg.lumyri.com/users/change-password' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"current_password": "12345678",
"new_password": "12345678"
}'

Response

{
"message": "OK"
}