# PetscGoogleDriveRefresh
Get a new authorization token for accessing Google drive from PETSc from a refresh token 
## Synopsis
```
PetscErrorCode PetscGoogleDriveRefresh(MPI_Comm comm, const char refresh_token[], char access_token[], size_t tokensize)
```
Not collective, only the first process in the `MPI_Comm` does anything


## Input Parameters

- ***comm -*** MPI communicator
- ***refresh token -*** obtained with `PetscGoogleDriveAuthorize()`, if NULL PETSc will first look for one in the options data
if not found it will call `PetscGoogleDriveAuthorize()`
- ***tokensize -*** size of the output string access_token



## Output Parameter

- ***access_token -*** token that can be passed to `PetscGoogleDriveUpload()`



## Options Database Key

- ***-google_refresh_token XXX -*** where XXX was obtained from `PetscGoogleDriveAuthorize()`





## See Also
 `PetscURLShorten()`, `PetscGoogleDriveAuthorize()`, `PetscGoogleDriveUpload()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/webclient/google.c.html#PetscGoogleDriveRefresh">src/sys/webclient/google.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/webclient/tutorials/googledriveupload.c.html">src/sys/webclient/tutorials/googledriveupload.c.html</A><BR>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
