rate limitと深い関係がある2つの認可方法がある.
Rate limit
- Per User: user access tokenごとのレート制限
- Per Application: "application-only authentication"
この2つは完全に別物.
This limit is considered completely separately from per-user limits.
GETの場合、(ユーザー, app) に対してrate limitがかかる.
あるユーザーが全アプリで呼べるGET回数、みたいなものはない.
POSTの場合はアプリまたいでユーザー単位.
Rate limiting
Rate limiting — Twitter Developers
Application-only authentication: OAuth2 (bearer token) : アプリケーションがAPIを叩く(≠ユーザーがアプリを介してAPIを使う)
Application-only authentication is a form of authentication where an application makes API requests on its own behalf, without the user context.
"user context"
Application-user authentication: OAuth 1a : The user authentication method of authentication allows an authorized app to act on behalf of the user, as the user.
Per Application: "application-only authentication"
OAuth2.0 Client Credentials Grant flowによる認可 1.
OAuth2.0 Client、つまりアプリが自身のcredentialsをもっており、そのcredentialsをaccess tokenと勝手に交換してくるタイプ.
credentialsはClientが保持していることになるので、webのTwitter appでは使えないflow.