Curl 将用户验证为stocktwits

Curl 将用户验证为stocktwits,curl,stocktwits,Curl,Stocktwits,正在搜索为单个用户获取访问令牌的方法。看起来好像是说可以通过单个curl请求对用户进行身份验证并获取访问令牌: cURL [ about cURL ] // Token example curl -X GET -u <username> -p https://api.stocktwits.com/api/2/oauth/authorize -d 'client_id=<client id>&response_type=token&redirect_uri=

正在搜索为单个用户获取访问令牌的方法。看起来好像是说可以通过单个curl请求对用户进行身份验证并获取访问令牌:

cURL [ about cURL ]
// Token example
curl -X GET -u <username> -p https://api.stocktwits.com/api/2/oauth/authorize -d 'client_id=<client id>&response_type=token&redirect_uri=http://www.example.com&scope=read,watch_lists,publish_messages,publish_watch_lists,follow_users,follow_stocks'

// Code example
curl -X GET https://api.stocktwits.com/api/2/oauth/authorize -d 'client_id=<client id>&response_type=code&redirect_uri=http://www.example.com&scope=read,watch_lists,publish_messages,publish_watch_lists,follow_users,follow_stocks'
cURL[关于cURL]
//象征性示例
curl-X GET-u-phttps://api.stocktwits.com/api/2/oauth/authorize -d'client\u id=&response\u type=令牌和重定向\u uri=http://www.example.com&scope=read,监视列表,发布消息,发布监视列表,跟踪用户,跟踪股票
//代码示例
curl-xgethttps://api.stocktwits.com/api/2/oauth/authorize -d'client\u id=&response\u type=代码和重定向\u uri=http://www.example.com&scope=read,监视列表,发布消息,发布监视列表,跟踪用户,跟踪股票

但尝试了多次尝试使用令牌示例提供用户名和密码,但stocktwits似乎正在重定向到登录页面。是否删除了此功能或我在某处出错?

看起来是对文档的误解。您自己无法通过请求获取访问令牌。文件状态

您的应用程序通过将用户重定向到https://api.stocktwits.com/api/2/oauth/authorize 在客户端id、响应类型设置为“code”的情况下,用户在授权过程后应重定向回URL(重定向uri)。还可以在逗号分隔的列表中传递(作用域)作用域以请求进一步的权限。查看授权呼叫。在浏览器中输入以下URL或将用户引导到该URL进行身份验证:

用户在指向url后,在提供的表单上输入其凭据。请看