Permission denied while calling GCP App engine REST API

295 views
Skip to first unread message

Ajay Prakash

unread,
Dec 15, 2021, 3:25:32 AM12/15/21
to Google App Engine

I am trying to call GCP App Engine REST API- https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps/get from API explorer as well as postman . This gives http code 403 . I am able to deploy service from my local using cloud sdk with same user account. Not sure why only REST API is not working. Any body else faced this issue.

Request - GET https://appengine.googleapis.com/v1/apps/test?key=[YOUR_API_KEY] HTTP/1.1 Authorization: Bearer [YOUR_ACCESS_TOKEN] Accept: application/json Response- { "error": { "code": 403, "message": "The caller does not have permission", "status": "PERMISSION_DENIED" } }

roles added to my principle- App Engine Admin, App Engine Code Viewer, App Engine Deployer, App Engine Service Admin, App Engine Viewer, Owner

barrado

unread,
Dec 20, 2021, 11:44:12 AM12/20/21
to Google App Engine
You need to include your API KEY and the BEARER TOKEN in the request, for example using curl it would be:

curl \
  'https://appengine.googleapis.com/v1/apps/[YOUR_APP_ID]?key=[YOUR_API_KEY]' \
  --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
  --header 'Accept: application/json' \
  --compressed

Also you can try the API explorer which is easier to use as you only need to specify your APP ID.
Reply all
Reply to author
Forward
0 new messages