Token validation
Position | Parameter | Name | Type | Description |
{1} | body | appId | string | VIVEPORT ID of the title requiring access to VIVEPORT internal services |
{2} | body | serviceToken | string | Token retrieved from service token management |
{3} | body | userToken | string | Token retrieved from the Session Token API |
HTTP Method: POST
URL:
https://www.viveport.com/api/thirdpartygatewayservice/v2/monitor/tokens/validate
Validates existing tokens and returns a userId which can be used for authentication.
Sample response
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 validation error codes
Type | Description |
400 Bad request | Invalid payload |
403 Forbidden | VIVEPORT server unable to decrypt serviceToken |
406 Not Acceptable | VIVEPORT server unable to decrypt userToken from Session Token API |
500 Internal Server Error | Service Token Expiration Error |