It is a template is ready to use, setting up a Node.js server for Intagram-API OAuth purpose.
- Create an Instagram Application
- Copy Client ID and Client Secret to this project
- Prepare a domain name, where Node.js server is hosted, add it to Valid redirectURL
The Node.js server have to be run on the server where match the field Valid redirectURL
in Intagram Configuration
Run
$ git clone https://github.com/wahengchang/instagram-oauth-nodejs-server
$ cd instagram-oauth-nodejs-server
$ npm isntall
Then set up:
- process.env.INSTANGRAM_CLIENT_ID
- process.env.INSTANGRAM_CLIENT_SECRET
- process.env.INSTANGRAM_BASE_URL
$ npm start
GET https://www.instagram.com/oauth/authorize?client_id={CLIENT_ID}&redirect_uri={http://youhost/authorize_user}&response_type=code