Closed mbardelmeijer closed 4 years ago
I have updated the API to handle this. As requested the response sets a variable called InstagramToken
to the value of the current Access Token.
The end point to use in your script tag is in the format of:
https://ig.instant-tokens.com/users/{userId}/instagram/{instagramUserId}/token.js?userSecret={userSecret}
I'll update the wiki and site in the next week or so.
The site has no been updated to display this information
Hey, awesome service. Question: could the response be modified to return a javascript file that sets the token?
So for instance:
<script src="https://ig.instant-tokens.com/users/XXXXXXXXXXXXXXXXXXXXXXXXX/instagram/XXXX/token.js"></script>
-> returnsvar InstagramToken = 'TOKENXXXXXXXXXX';
Then on the page, we can include this JS: See example of
<script src='https://(your-token-app-name).herokuapp.com/token.js'></script>
And the variable is set directly without needing to do a ajax request:
<script>alert(InstagramToken);</script>