Please Select Your Location

Thailand
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
India
Ireland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malaysia
Malta
Mexico
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Saudi Arabia
Singapore
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States
Việt Nam
المملكة العربية السعودية (Arabic)

Token 验证

位置 参数 名称 类型 描述
{1} body appId string 需要访问 VIVEPORT 内部服务的内容的 VIVEPORT ID
{2} body serviceToken string 从服务 Token 管理中获取的 token
{3} body userToken string Session Token API 中获取的 token



HTTP 方法:POST

URL: https://www.viveport.com/api/thirdpartygatewayservice/v2/monitor/tokens/validate

验证现有 token 并返回可用于身份验证的 userId。



响应示例

curl -X POST 
"https://www.viveport.com/api/thirdpartygatewayservice/v2/monitor/tokens/validate"
-H "accept: application/json"
-H "Content-Type: application/json"
-d "{
\"appId\":\"SampleApp\",
\"serviceToken\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJleHAiOjE1MjUzMzQ2NzcsImlhdCI6MTUyNTMzMTA3NywiZHVyYXRpb24iOjM2MDB9.HsdxbtW9-o-d6I_U_gZGS7yE5g4DzD5P39ZnHBq4YU5LCtiz5-UhyNDjEoiqJ-_Z3OJLJYRgD2mX2Gy4YENkdXFA9wV0gi6qC8-5YWHHWFBleQyaDmtH0jUdm6P_pGZgvlMniGsnQaAObzcIh2CRGFZycpqmGzFrSYVaJdqrPtcSm-eJGDTihIgoisZrvZmxYLDQi5cwdoCK-Z3VLyjgsWNVQ-Hg9t6m1kVuKLdjLFkLzTk18NqlpFZ-8yDU2vgrBNFoSzBlDDGozFBho1AKF_Xc8NVqhfNZzKF7mv0NkVzVo8g5FesPQUpNrZY4a2RKdWP0fdIfWL2OfFPx8G-Uqw\",
\"userToken\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJleHAiOjE1MjUzMzQ2OTgsImlhdCI6MTUyNTMzMTA5OCwiZHVyYXRpb24iOjM2MDB9.IKf9D1QR4eLSYChVWxT2YmbNQL7f6KUKFoRYMxsNLwNipr4Fg-YHDp65oh7CopnX-G8SCovMh5HvDXPFEFGP9bWzrLaDXN_gjSVvI38ut3qrj-q5NSqm7DVK6blCPSK2Qh9YdTDm_1q3nDBX_C-qQvuooJ4hL2b6zK0Q4yLukcR2a2QvIUF82QJVIVb1Oa5qSVCYXSnjY71j4w9AcYmDecQmtMperk3q1fF5nGonafiMOb9s88zwCyGRe_LESt5czWCpivwWa38Gm24oq2NxwqW_LJrZ9ARy_2MqogKQJwJQXv3IAN6QT79hEnFnqaQKsgd94D2DxL4MF2W7slfRjw\"
}"
 
HTTP/1.1 200 OK
 
{
"publicName": “userPublicName”,
 "userId": "1db96bde-c48e-48f6-8b61-7d3d550068ab"
}



Token 验证错误代码

类型 描述
400 Bad request 无效的有效载荷
403 Forbidden VIVEPORT 服务器无法解密服务 Token
406 Not Acceptable VIVEPORT 服务器无法从 Session Token API 解密 userToken
500 Internal Server Error 服务 Token 过期错误