Google Cloud OAuth app with redirect URI http://localhost:8080.
{
"apis": {
"gmail": {
"base_url": "https://www.googleapis.com",
"spec_url": "https://raw.githubusercontent.com/APIs-guru/openapi-directory/main/APIs/googleapis.com/gmail/v1/openapi.yaml",
"pagination": {
"next_path": "nextPageToken",
"page_param": "pageToken"
},
"profiles": {
"default": {
"auth": {
"type": "oauth-authorization-code",
"params": {
"authorize_url": "https://accounts.google.com/o/oauth2/auth",
"token_url": "https://oauth2.googleapis.com/token",
"client_id": "env:GMAIL_CLIENT_ID",
"client_secret": "env:GMAIL_CLIENT_SECRET",
"scopes": "https://mail.google.com/ https://www.googleapis.com/auth/gmail.modify",
"redirect_port": "8080"
}
}
}
}
}
}
}export GMAIL_CLIENT_ID="<your_client_id_from_google_cloud>"
export GMAIL_CLIENT_SECRET="<your_client_secret_from_google_cloud>"redirect_port: "8080"- Must match Google app configgmail.modifyscope - Enables label operationsnextPageTokenpagination - Gmail's cursor style
restish gmail gmail-users-labels-list meOpens browser for OAuth, caches token for future runs.
All 79 Gmail API operations available:
restish gmail --help