go-samples icon indicating copy to clipboard operation
go-samples copied to clipboard

token expired and refresh token is not set

Open isomorphisms opened this issue 5 years ago • 1 comments

Expected Behavior

load labels with go run quickstart

Actual Behavior

unable to retrieve labels: Get https://www.googleapis.com/gmail/v1/users/isomorphismes%20gmail.com/labels?alt=json&prettyPrint=false: oauth2: token expired and refresh token is not set exit status 1

Steps to Reproduce the Problem

  1. copy the code
  2. click buttons to enable gmail api
  3. fix the misplaced if statement
  4. go run quickstart.go

Specifications

  • Go version (go version) 1.13.5 linux/386
  • OS (Mac/Linux/Windows) void linux

isomorphisms avatar Jan 09 '20 20:01 isomorphisms

Do you have a token.json in your working directory? Please try deleting it and running the quickstart again. Which if statement are you referring to in #3?

asrivas avatar Jan 29 '20 02:01 asrivas