How do I retrieve email addresses from user searches with Enforce Scopes enabled?

max_spicer
Community Novice

I am trying to search for users by email address and have their email returned in the results. I'm using the following url:


/accounts/self/users?include[]=email&search_term=foo@example.com

My searches returns the expected users, but do not include the requested email property in the returned user objects.

I'm using an access token from a Developer Key to authorise my searches and this key has Enforce Scopes enabled.

After some experimentation, I've found that the same search does include the email property in the user objects if I disable Enforce Scopes on the developer key.

Is there a way to do this when Enforce Scopes is enabled? Do I need to enable some other scopes?

0 Likes