Skip to content

Instantly share code, notes, and snippets.

@PamornT
Created October 20, 2019 20:02
Show Gist options
  • Save PamornT/d0ba19c47c2f05ecc8e2c1efa02d0531 to your computer and use it in GitHub Desktop.
Save PamornT/d0ba19c47c2f05ecc8e2c1efa02d0531 to your computer and use it in GitHub Desktop.
...
if(event.message.text === 'register') {
let access_token = await issue_access_token();
access_token = JSON.parse(access_token);
await initialLINE(access_token['token_type'], access_token['access_token']);
await admin.database().ref('token').child(event.source.userId).set(access_token);
// 9. Reply result to User Chat Room
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment