How to get user email address in api proxy?

Not applicable

Hi,

Is it possible to get user email in api proxy preflow stage. If yes, pls suggest steps.

Thanks,

Jeevan

0 4 502
4 REPLIES 4

Hi @jeevan

Can you please elaborate your question and use case ?

Not applicable

Hi Sai,

We want to enforce some restriction on data based on email address pattern in the backend api. Hence we want to extract use email at api proxy preflow stage and want to send it to target api.

Thanks,

Jeevan

@jeevan

Yes, It's possible.

  • First, you need to send some data related to the developer like app key / developer id etc in the request.
  • Let's assume you sent apikey of developer app which inturns associated with the developer account.
  • See here Apigee Docs that explain how you can retrieve developer email using Access Entity Policy / Extract Variables Policy.

Keep us posted if you have any queries.

HI @jeevan

You can do this by setting the email id as a custom attribute while generating the access token. More info here.

Once this is set, in your API proxy, while Verifying the Access token, you should be able to get the custom attribute (email) as a flow variable that can be used anywhere in your API proxy