如何获得Instagram访问令牌 [英] How to get an Instagram Access Token

查看:222
本文介绍了如何获得Instagram访问令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的在为获取我的Instagram访问令牌的方式上苦苦挣扎,

I'm really struggling in how I'm meant to get my access token for Instagram,

我注册了一个新客户端,然后使用了该URL

I've registered a new client and then I used this URL

https://api.instagram.com/oauth/authorize/?client_id =客户端ID& redirect_uri = REDIRECT-URI& response_type = code

填写客户ID并重定向网址.

to fill in the clients ID and redirect Url.

然后,我被重定向到一个页面,该页面在Url中显示了一个代码,但是从那里我不知道id会在哪里获取我的访问令牌.

I then was redirected to a page where it displayed a code in the Url but from there I don't have a clue where id then get my access token.

推荐答案

与官方API文档的链接为 http://instagram.com/开发人员/身份验证/

Link to oficial API documentation is http://instagram.com/developer/authentication/

Longstory简短内容-两个步骤:

Longstory short - two steps:

获取代码

打开 https://api.instagram.com /oauth/authorize/?client_id = CLIENT-ID& redirect_uri = REDIRECT-URI& response_type = code ,其中包含来自 http的信息://instagram.com/developer/clients/manage/

获取访问令牌

curl \-F 'client_id=CLIENT-ID' \
    -F 'client_secret=CLIENT-SECRET' \
    -F 'grant_type=authorization_code' \
    -F 'redirect_uri=YOUR-REDIRECT-URI' \
    -F 'code=CODE' \
    https://api.instagram.com/oauth/access_token

这篇关于如何获得Instagram访问令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆