:orphan: # PetscGoogleDriveAuthorize Get authorization and refresh token for accessing Google drive from PETSc ## Synopsis ``` PetscErrorCode PetscGoogleDriveAuthorize(MPI_Comm comm, char access_token[], char refresh_token[], size_t tokensize) ``` Not Collective, only the first process in `MPI_Comm` does anything ## Input Parameters - ***comm -*** the MPI communicator - ***tokensize -*** size of the token arrays ## Output Parameters - ***access_token -*** can be used with `PetscGoogleDriveUpload()` for this one session - ***refresh_token -*** can be used for ever to obtain new access_tokens with `PetscGoogleDriveRefresh()`, guard this like a password it gives access to your Google Drive ## Notes This call requires `stdout` and `stdin` access from process 0 on the MPI communicator You can run src/sys/webclient/tutorials/googleobtainrefreshtoken to get a refresh token and then in the future pass it to PETSc programs with `-google_refresh_token XXX` ## See Also `PetscGoogleDriveRefresh()`, `PetscGoogleDriveUpload()`, `PetscURLShorten()` ## Level intermediate ## Location src/sys/webclient/google.c ## Examples src/sys/webclient/tutorials/googleobtainrefreshtoken.c
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/webclient/google.c) [Index of all Sys routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)