トークン取得API - dongaba/TVerRec GitHub Wiki
他の API コールで必要となるplatform_uid
とplatform_token
を取得することが可能。
コールする度に新しいplatform_uid
とplatform_token
が付与される。
ここで取得したplatform_uid
とplatform_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": ""
}
}