トークン取得API - dongaba/TVerRec GitHub Wiki

概要

他の API コールで必要となるplatform_uidplatform_tokenを取得することが可能。
コールする度に新しいplatform_uidplatform_tokenが付与される。
ここで取得したplatform_uidplatform_tokenは数カ月間は継続使用ができる模様。

メソッド

POST

エンドポイント

https://platform-api.tver.jp/v2/api/platform_users/browser/create

ヘッダ

特に設定不要

パラメータ

特に設定不要

サンプルコード

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/x-www-form-urlencoded")
$body = "device_type=pc"
$response = Invoke-RestMethod 'https://platform-api.tver.jp/v2/api/platform_users/browser/create' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json

レスポンス

レスポンス例はこちら
{
	"api_version": "v2",
	"code": 0,
	"message": "",
	"type": "hash",
	"result": {
		"platform_uid": "8d11206e6d37479896779213a4ab8c0d9709",
		"platform_ad_uuid": "3dee14ea-605d-4688-a666-67adf316b02f",
		"platform_token": "9ctqx215rh89jt3ygli3qskgeqlp4gk1r23161es",
		"browser_id": "tf38ohym3h00qncpyyhby4zlanhsowpmfeeo",
		"device_type": "pc",
		"agreement_version": ""
	}
}
⚠️ **GitHub.com Fallback** ⚠️