I am using google drive api with laravel for a continuous backup, so I am using following packages
"nao-pon/flysystem-google-drive": "~1.1", and
"spatie/laravel-backup": "^6.14"
I have set up google drive api v3 with refresh token and put it into .env
FILESYSTEM_CLOUD=google
GOOGLE_DRIVE_CLIENT_ID=****.apps.googleusercontent.com
GOOGLE_DRIVE_CLIENT_SECRET=****
GOOGLE_DRIVE_REFRESH_TOKEN=****
GOOGLE_DRIVE_FOLDER_ID=****
so everything works properly, and I can use google drive as a disk to store the back up everyday through a cron job, the only problem is after a week the refresh token gets expired(I assume) and stops working with this error message,
Failed to authenticate on SMTP server with username "****" using 2 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 Incorrect authentication data
if I change the refresh token again from oathplayground and place it into .env
it starts working again for a week.
so how can I solve this problem thus I need not to generate the token every week.