0

When i visit the endpoint '/api/v1/users/me/data/csv', i receive the following message:

{
     "error": {
     "title": "Unauthorized",
     "message": "You are not authorized to perform that action. Please use the api_key 
     parameter with your registered key.",
     "status": 401
     }
}

The endpoint is supposed to go to the buckets and write data as a CSV that the user can download. I am not sure what "api_key" they are referring to here.

Could this just be that i am not using accessing the correct bucket or is it that i am not using the correct key?

Soni Sol
  • 2,367
  • 3
  • 12
  • 23
VickTree
  • 889
  • 11
  • 26

1 Answers1

2

To verify which Key it is Check the logs on App Engine to see if the call got all the way to App Engine. To Check the App Engine Logs do the following:

  • Go to Console
  • Go to App Engine >> Versions
  • For the serving version go to Tools >> Logs

This will Open the logs for that version and if the calls are getting to app engine you will see the invocations there. If you don't see any invocation it is because they are getting stopped by Cloud Endpoints.

This Error is usually triggered by Cloud Endpoints when you specify APIkey Security for the path and calling it without key parameter or with a wrong key.

Soni Sol
  • 2,367
  • 3
  • 12
  • 23
  • where can i go to check the app engine logs? sorry, i am still new to cloud platforms. – VickTree Feb 05 '20 at 03:03
  • thanks, i can see the logs. I still do not seen anything to do with API keys. how can i tell what key is being passed? what should i be looking out for. What should i post to get better help? thank you – VickTree Feb 05 '20 at 21:13
  • on the logs you will see if there is the call getting to the method within App Engine. If you see the invocation then the error will be there as well, If you dont see it the error is because of calling with a wrong API key – Soni Sol Feb 06 '20 at 01:51
  • i am still not sure what to do. I rephrased the question more broadly and submitted another question. If it is possible for you to review it, it would be appreciated. Thanks. https://stackoverflow.com/questions/60102619/google-cloud-downloading-an-csv – VickTree Feb 06 '20 at 19:58