Question

Retrieve all User Alliases

  • 11 March 2024
  • 2 replies
  • 63 views

Badge

Hi, I need to get from an Alias, all aliases related to that one, for example, if a user created the account with alias `1`, and changed the alias somewhere to `2`, and then `3`, and so, I want to be able to retrieve all other aliases just by sending one to RevenueCat.

I’ve tried with the EP https://api.revenuecat.com/v1/subscribers/{userId} but it doesn’t retrieve that data.
I’ve found a related post but the only answer said that on API v2 it would be possible, and I didn’t find anything in there in order to do that.

 

Thank you!


This post has been closed for comments

2 replies

Userlevel 4
Badge +6

Hey @mateo-gonzalez !

 

Do you have webhooks set up for your app? If so, in the webhook events you should see an aliases field. This field will include all app user ids ever used by the subscriber. 

 

If you dont already have this setup, I recommend setting up webhooks so you can gather this information. More info on this can be found here: https://www.revenuecat.com/docs/integrations/webhooks/event-types-and-fields#common-fields

 

Let me know if that helps! 

Badge

Thank you, that’s helpful.


I’ve also requested access to the Beta API V2 and we’ve been granted, so we can ask anytime for the user aliases.