2

How to increase the life of the application key? The default is one hour

{"access_token":"ya29.GlubBHRrSI1rJcFqTllIzCqWSd48E8GX9xTgcDqaR7JVhHzxABdV2Z-0T256tqroQipuvZYbIPwcYvSdyCrnWDlQLJvhzt0cOalYmBJ2nwUOo734uD4pnQOr5pshK","token_type":"Bearer","expires_in":3600,"created":1501687024}

Angel Cuenca
  • 1,637
  • 6
  • 24
  • 46

1 Answers1

1

Access tokens have only a lifespan of 1 hour, after that, you'll be needing refresh tokens. You can set them in PHP by using client->setAccessType("offline");

For more info about refresh tokens, you can read this SO post.

This SO post has PHP implementations that might be of help as well.

ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56