Hello,
I am trying to get a temporary token using this library. I can successfully send a request using the provided GetToken method, however the returned token seems to be empty.
Please see the image below for the returned values, the AccessToken and TokenType is "", the expiry value is set to 0.
Is there anything I can modify with the request to get this working?
Thanks!
Hi Lorenz,
Looking at your screenshot, I would suggest to add a Site Property named GoogleAPIPrivateKey and store the value of the private key only, without any additional text (even if it looks like its commented).
And then in the PrivateKey send it site.GoogleAPIPrivateKey.
If the text, is just to hide the private key, then I would suggest to look into the logs in service center to check if you have any logged error.
If you need any additional help, please let me know.
Thank you.
Hey,
I tried it again and now it seems to work? Didn't really change anything so I can't comment on what the issue was in the first place.
Thanks anyways for the help!
I had the same problem. I solved in this way:
- check the PrivateKey parameter (set it as multiline text by replacing the "\n" with actual new lines)
- use the correct Scope. The correct scope for me is "https://www.googleapis.com/auth/cloud-platform" (which sounds good to evoke most GCP services)