Instagram returning “Matching code was not found or was already used” when using OAuth

前端 未结 8 1190
名媛妹妹
名媛妹妹 2021-01-30 07:00

I am trying to use the Instagram OAuth using the developer documentation at

https://www.instagram.com/developer/authentication/.

Step 1 and 2 a

8条回答
  •  感情败类
    2021-01-30 07:24

    Logging in to Instagram, then complete Step 1 from the API Docs (https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code), then follow the redirect and copying the code from the URL, then logging out of my account, then completing Step 3:

    curl -F 'client_id=CLIENT_ID' \
    -F 'client_secret=CLIENT_SECRET' \
    -F 'grant_type=authorization_code' \
    -F 'redirect_uri=AUTHORIZATION_REDIRECT_URI' \
    -F 'code=CODE' \
    https://api.instagram.com/oauth/access_token
    

    That worked for me.

提交回复
热议问题