apps
Register client applications that can be used to obtain OAuth tokens.
post
Create an application
Create a new application to obtain OAuth2 credentials.
戻り値: Application, with client_id
and client_secret
OAuth: Public
実装履歴:
- 0.0.0 - 追加
- 2.7.2 - now returns vapid_key
リクエスト
フォームのパラメータ
string
string
urn:ietf:wg:oauth:2.0:oob
in this parameter.
string
read
.
string
レスポンス
200: Success
Store the client_id
and client_secret
in your cache, as these will be used to obtain OAuth tokens.
{
"id": "563419",
"name": "test app",
"website": null,
"redirect_uri": "urn:ietf:wg:oauth:2.0:oob",
"client_id": "TWhM-tNSuncnqN7DBJmoyeLnk6K3iJJ71KKXxgL1hPM",
"client_secret": "ZEaFUFmF0umgBX1qKJDjaU99Q31lDkOU8NutzTOoliw",
"vapid_key": "BCk-QqERU0q-CfYZjcuB6lnyyOYfJ2AifKqfeGIm7Z-HiTU5T9eTG5GxVA0_OH5mMlI4UkkDTpaZwozy0TzdZ2M="
}
422: Unprocessable Entity
If a required parameter is missing or improperly formatted, the request will fail.
{
"error": "Validation failed: Redirect URI must be an absolute URI."
}
get
Verify your app works
Confirm that the app’s OAuth2 credentials work.
戻り値: Application
OAuth level: App token
実装履歴:
- 2.0.0 - 追加
- 2.7.2 - now returns vapid_key
リクエスト
ヘッダ
string
レスポンス
200: Success
If the Authorization header was provided with a valid token, you should see your app returned as an Application entity.
{
"name": "test app",
"website": null,
"vapid_key": "BCk-QqERU0q-CfYZjcuB6lnyyOYfJ2AifKqfeGIm7Z-HiTU5T9eTG5GxVA0_OH5mMlI4UkkDTpaZwozy0TzdZ2M="
}
401: Unauthorized
If the Authorization header contains an invalid token, is malformed, or is not present, an error will be returned indicating an authorization failure.
{
"error": "The access token is invalid"
}
最終更新 May 17, 2020 · このページを改善する
他の言語:
English