schmorrison / Zoho

Golang API for Zoho services
MIT License
35 stars 34 forks source link

Set proper expiration time #18

Closed beatscode closed 4 years ago

beatscode commented 4 years ago

I had this weird issue where I was constantly requesting refresh tokens and constantly getting {error:'invalid_code'} responses. The successful response from generating token did not have expires_in_seconds value

image

schmorrison commented 4 years ago

Weird seems like they removed the 'expires_in_sec' value from the response, it was admittedly redundant.

I'd ask you remove the 'ExpiresInSeconds' field from the 'AccessTokenResponse' struct, and fix any compile errors that occur because of the missing field.