Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yonathanguez/api_graph_instagram_test
https://github.com/yonathanguez/api_graph_instagram_test
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/yonathanguez/api_graph_instagram_test
- Owner: YonathanGuez
- Created: 2020-04-13T18:23:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T11:30:35.000Z (about 2 years ago)
- Last Synced: 2023-02-28T04:38:36.269Z (almost 2 years ago)
- Language: JavaScript
- Size: 586 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# api_graph_instagram_test
# Install Yarn :
## Setting :
```
yarn```
## Create : .env with
```
APP_ID_INSTA="APP_ID"
URI_REDIRECTION=https://localhost:3000/auth
APP_SECRET="APP SECRET "```
Help for configuration .env:
![](image/basic-display-resource.jpg)## RUN:
```
yarn start
```## Explanation :
1) we will call in front the authorize request and do it our validation with instagram :
```
https://api.instagram.com/oauth/authorize?client_id={app-id}&redirect_uri={redirect-uri}&scope=user_profile,user_media&response_type=code
```2) we will request access_token with "code" that autorize give use:
```
curl -X POST \
https://api.instagram.com/oauth/access_token \
-F client_id={app-id} \
-F client_secret={app-secret} \
-F grant_type=authorization_code \
-F redirect_uri={redirect-uri} \
-F code={code}
```3) In developement:
```
curl -X GET \
'https://graph.instagram.com/{user-id}?fields=id,username&access_token={access-token}'
```4) In developement:
```
/{user-id}/media
```
for redirection
"ngrok http localhost:3000"