Scrabionau77
Scrabionau77

Reputation: 1

Google Service Account by REST

Hi to all and sorry for my English!

I'm new to Google-API and I need use Google Service Account to access Google-API on my php server. I can't use client-php-google-api, so I'd like call google-api by REST.

Do I need a refresh token? If Yes, how can I get a refresh token for service account?

Upvotes: 0

Views: 2763

Answers (1)

Furhan S.
Furhan S.

Reputation: 1524

You will require a service account and access token (No need for refresh token in this scenario). To get an access token, you will require JWT. JWT token has an expiry of maximum 1 hour and you will need to re-issue a new JWT after its expiry. Please refer to following guide on getting JWT/Access Token and then making API calls:

Using OAuth 2.0 for Server to Server Applications

Upvotes: 1

Related Questions