Skip to content

Instantly share code, notes, and snippets.

@bibhuticoder
Created July 29, 2021 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bibhuticoder/5bf98c2c1aaca59f431569bf1b114b77 to your computer and use it in GitHub Desktop.
Save bibhuticoder/5bf98c2c1aaca59f431569bf1b114b77 to your computer and use it in GitHub Desktop.
try {
let resp = await axios.get(`https://graph.instagram.com/access_token?grant_type=ig_exchange_token&client_secret=${process.env.INSTA_APP_SECRET}&access_token=${accessToken}`)
accessToken = resp.data.access_token;
// save accessToken to Database
} catch (e) {
console.log("Error=====", e.data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment