As per the documentation, I need to call the end point with access token in the header.
curl -X POST \ -H "authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ -d '{"trigger_id":"api_trigger/TRIGGER_NAME"}' \ "https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/-:execute"
The external application does not have access to GCP it actually calls the API once an event is fired. Is there a way to get the access token through API call. It would be better If APIGee gateway can be used so that external services does not need to call the API Trigger altogether.
Hello Ritwik !
You can use Apigee proxy with Integration as the target. It has been documented here:
apigeecli apis create integration -i <integration-name> -n <proxy-name> --trigger <trigger-id> -o <project> -t <token>
Let me know if you need any more details.