Identity platform: Email not triggered for "Send password reset email" api

GIP
Bronze 1
Bronze 1

 

Can anyone please let me know how do we set up email server for google identity platform "Send password reset email" API.  It was told that 'You can send a password reset email by issuing an HTTP POST request'. I am getting success response but not receiving email. What configuration needs to be done for triggering email.

Endpoint: https://identitytoolkit.googleapis.com/v1/accounts:sendOobCode?key=[API_KEY]

Thanks

0 1 452
1 REPLY 1

As shown in the accounts.sendOobCode method documentation, you can send several fields in the request body.

The fields you should provide are request type and email:

  • requestType enum (OobReqType)
    Required. The type of out-of-band (OOB) code to send. Depending on this value, other fields in this request will be required and/or have different meanings. There are 4 different OOB codes that can be sent: * PASSWORD_RESET * EMAIL_SIGNIN * VERIFY_EMAIL * VERIFY_AND_CHANGE_EMAIL
  • email string
    The account's email address to send the OOB code to, and generally the email address of the account that needs to be updated. Required for PASSWORD_RESET, EMAIL_SIGNIN, and VERIFY_EMAIL. Only required for VERIFY_AND_CHANGE_EMAIL requests when returnOobLink is set to true. In this case, it is the original email of the user.

An example of the POST request is as follows:

POST https://identitytoolkit.googleapis.com/v1/accounts:sendOobCode?key=[YOUR_API_KEY] HTTP/1.1
Authorization: Bearer [YOUR_ACCESS_TOKEN]
Accept: application/json
Content-Type: application/json
{
"requestType": "PASSWORD_RESET",
"email": "[EMAIL_OF_THE_USER]"
}

 

Top Labels in this Space