2017-02-01 19 views
0

シングルユーザーのためにaccess_tokenを取得する方法を検索しています。株価のユーザーを認証

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' 

しかし、トークンの例を使用してユーザー名とパスワードを提供するいくつかの試みを試みたが、stocktwitsは、ログインページにリダイレクトされるようになります。API Documentationのように見えるその可能ユーザを認証し、単一のカール要求を介しaccess_tokenは取得することを言います。この機能が削除されたか、どこかで間違いがありましたか?

答えて

0

ドキュメントの誤解があるようです。アクセストークンは、ご自分では取得できません。ドキュメントの状態

Your application requests authorization by redirecting your user to https://api.stocktwits.com/api/2/oauth/authorize with your client_id, response_type set to 'code' and the URL the user should be redirected back to after the authorization process (redirect_uri). Scopes can also be passed (scope) in a comma-delimited list to request further permissions. View the authorize call. Enter the following URL into your browser or direct your users to it for authentication:

ユーザーはURLにそれらを指示した後のフォームの資格情報を入力します。をご覧ください。https://stocktwits.com/developers/docs/authentication