Skip to main content

Hi everyone, could you please tell me how I can retrieve the user object when the site loads? I'm particularly interested in displaying the user's email in the UI. Is this possible, and how can it be implemented? Thanks in advance!

Hey ​@Vadym - I think the best place for you to start is probably the inSidedData Object:

It won’t give you the email address natively, but it will give you the ID and username of the visitor.


Hey ​@Vadym - I think the best place for you to start is probably the inSidedData Object:

It won’t give you the email address natively, but it will give you the ID and username of the visitor.

Hi, thanks for the response! 🙃
I’ve looked into that object, but unfortunately it doesn’t provide access to the email.
I also tried making an API request, but I’m getting an error.
I’d really like to understand how to do this properly step by step 🤔


Gotcha ​@Vadym - building something like that is beyond my skills but hopefully someone more technical will chime-in.  :)


Hey, there is perhaps a data protection reason why you can't retrieve user email addresses like that, no?


@jvdc exactly right it’s a security issue to include the email address in this object.

@Vadym the following answer to this question provides a workaround of how you can achieve this:

Thanks!


@olimarrio thanks a lot!


Reply