Reputation: 631
I have two Cloud Functions: a frontend and an API. I have added a frontend
service account to the frontend Cloud Function that has Cloud Function Invoker
rights:
I have also explicitly added this service account as a permission to the API Cloud Function, yet I am still getting 403 Not Authorized
statuses.
const categories = await this.$axios.$get("/api/v1/categories/", {
params: { hasParent: 0 },
});
Upvotes: 0
Views: 863
Reputation: 76073
You must add the authorization header to make it work! It's not out of the box!
But, the cloud functions doc is bad to explain that. Use the Cloud Run documentation instead (the 2 services use the same underlying infrastructure and the principle are the same, the doc is simply easier to use on Cloud Run!!)
Upvotes: 2