0

Within the endpoints handler method, how can the client information be obtained.

Whether the request came from Webclient or Android or iOS?

Also, how to identify whether the request came from API Explorer?

Michael Meyer
  • 2,179
  • 3
  • 24
  • 33
user362953
  • 435
  • 2
  • 13
  • If I understand well your first question, you can get the current user by invoking endpoints.get_current_user(), see https://cloud.google.com/appengine/docs/standard/python/endpoints/auth – Renaud Tarnec Feb 28 '17 at 08:45
  • @3371862 Thanks. I am not looking for the user, but how the user tried accessing the API. Whether through browser/javascript (if possible which browser), Android App or iOS App? – user362953 Feb 28 '17 at 20:58
  • Ok! For your last question, have a look at point #1 in http://stackoverflow.com/a/42521425/3371862 – Renaud Tarnec Mar 01 '17 at 09:17

1 Answers1

0

The User-Agent header identifies most official clients by language. It will contain something similar to google-http-java-client or google-api-java-client. For JavaScript, you should look at X-Javascript-User-Agent.

saiyr
  • 2,575
  • 1
  • 11
  • 13