Skip to content

Instantly share code, notes, and snippets.

@iskenxan
Created March 25, 2019 03:32
Show Gist options
  • Save iskenxan/2e568aa1dca04fc32beeefcce26f8a08 to your computer and use it in GitHub Desktop.
Save iskenxan/2e568aa1dca04fc32beeefcce26f8a08 to your computer and use it in GitHub Desktop.
Gmail add-on. Token Url
app.post('/token', (req, res) => {
const { code } = req.body;
console.log(code);
const result = {};
if (!code || code.length <= 0) {
result.error = 'no valid code!'
} else {
result.expires_in = 2592000
}
res.status(200).send(JSON.stringify(result))
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment