Skip to content

Instantly share code, notes, and snippets.

@enricop89
Created June 22, 2018 12:46
Show Gist options
  • Save enricop89/10f5e0adc14a18d45ad575097dbd3314 to your computer and use it in GitHub Desktop.
Save enricop89/10f5e0adc14a18d45ad575097dbd3314 to your computer and use it in GitHub Desktop.
Widget auth
const fetch = require('node-fetch');
fetch('https://sandbox.bandyer.com/rest/widget/chat/auth/usr_xxxxxx',
{ method: 'GET', headers: { 'Content-Type': 'application/json', apikey: 'ak_test_xxxxxxxxxxxx'},})
.then(res => res.json()) // this is mandatory
.then(json => console.log(json));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment