Posts

Showing posts from March 24, 2019

client is unauthorized to retrieve access tokens using this method service account error

Image
1 1 It's been such a major headache getting my service account to authenticate on the same webapp where I have users logging in via oauth2 as well. So I'm wondering, is this even possible? If not, should one just stick with the service account? Does one have to then authenticate the users on one's own - old school style? Haha Thanks. Regarding the service account, I have enabled the domain wide delegation, enabled the client key + api scope in my G suite admin console, and have gotten the php sample with the books api working. However any time I try any other api, other than books, I get the error, client is unauthorized to retrieve access tokens using this method UPDATE: I've tried to use @dalmto's example, and have added a few lines to test the gmail api, for example: putenv