cancel
Showing results for 
Search instead for 
Did you mean: 

Change of email address or phoneNumber is triggering webhook without new email/phoneNumber

grohitg238
Participant
0 Kudos
214

Hello Experts,

We have webhook configured for accountUpdated event. So, when we change email address after code verification it calls "account.otp.update" API. As mentioned in documentation, it triggers the accountUpdated event but the payload does not have changed email address or phone number.

Is there any way to add changed/new email/phoneNumber to payload?

Thanks

Rohit

View Entire Topic
samuelyang
Product and Topic Expert
Product and Topic Expert

Hi @grohitg238 

The change email address or phone number accountUpdated event alone does not provide the changed email address or phone number in the webhook payload. However after the change your email or edit phone number screen, the flow should trigger the update profile screen, where you see the changed email address or phone number. And if you go ahead and hit save on that screen, the accountUpdated event will be triggered one more time with the changed email address or phone number in the payload. 

The API call sequence should look like this: 

samuelyang_0-1718174868403.png

And you should receive two accountUpdated events like this: 

samuelyang_1-1718175167525.png

The first event is triggered without the email address or phone number in the payload when you verify the new email address or phone number, and the second one is triggered with the email address or phone number when you actually update the account on the profile screen. 

Here is the webhook configuration in the Console. 

samuelyang_2-1718175391831.png

Hope that helps 🙂

 

 

grohitg238
Participant
0 Kudos

Thanks Samuel, I have already added the profile update screen after the mobile code verification. PhoneNumber field is received under profile.phones.number, will it not send only phoneNumber?

grohitg238
Participant
0 Kudos
Thanks Samuel, I have already added the profile update screen after the mobile code verification. PhoneNumber field is received under profile.phones.number, will it not send only phoneNumber?
samuelyang
Product and Topic Expert
Product and Topic Expert
0 Kudos
For accountUpdated event, the data added to the payload is the data from the accounts.setAccountInfo REST API.