I want to run the authenticated .net cloudfunction on .net aplication . I have applied all possible solution , That is I have access the bearer token using service account key .json and passed to HTTPclient header . I can access the token ,But still getting 401. ( Error: Response status code does not indicate success: 401 (Unauthorized) . I have given required permissions for the task . Also When I run same cloudfunction url and access token on postman , getting same 401 error
Hi @Jiji_Biju ,
Welcome to Google Cloud Community!
There are several reasons behind the 401 Unauthorized error; it may probably be because there is a discrepancy between the token or permissions and what the Cloud Function requires.
Here are some things you may check:
This may assist you in identifying the source of the 401 error.
I hope the above information is helpful.
Thank you for your response . I have checked your points and seems , my token in invalid structure in which generated via Outh2.0 . Why this happening ??