Skip to content
Справочник APIConsumerConsumer.device auth

Verify a machine-key device challenge

Эта страница пока доступна только на английском языке. Руководства переведены; автоматически генерируемый справочник API публикуется на английском.

POST
/consumer/v1/auth/device/challenge/verify

Verifies the signed challenge response for a registered machine public key and issues a fresh device session token pair scoped to the selected project.

Header Parameters

X-Project-Id*string

UUID of the project that scopes consumer accounts, devices, sessions, and VSpaces for the request.

Formatuuid

Request Body

application/json

Signed machine-key challenge response for the selected project.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/consumer/v1/auth/device/challenge/verify" \  -H "X-Project-Id: 11111111-1111-1111-1111-111111111111" \  -H "Content-Type: application/json" \  -d '{    "challenge_id": "55555555-5555-5555-5555-555555555555",    "machine_key": "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=",    "signature": "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQGq2oWjU+lxD9iJS1C3G3J7h7dI4qv6tqjO8x7iPqjs4r22qW5r6VR8VY/qf4UYq+5Cmy5j/ZM9p0kzvP4nBw=="  }'
{  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.consumer-access.signature",  "device_id": "55555555-5555-5555-5555-555555555555",  "expires_in": 900,  "refresh_token": "forestvpn-refresh-token-demo",  "session_id": "66666666-6666-6666-6666-666666666666"}
{  "detail": "Pool slug must be unique.",  "instance": "urn:forestvpn:trace:a1b2c3d4",  "title": "Validation Error",  "type": "https://fvpn.net/errors/validation"}
{  "detail": "Pool slug must be unique.",  "instance": "urn:forestvpn:trace:a1b2c3d4",  "title": "Validation Error",  "type": "https://fvpn.net/errors/validation"}
{  "detail": "Pool slug must be unique.",  "instance": "urn:forestvpn:trace:a1b2c3d4",  "title": "Validation Error",  "type": "https://fvpn.net/errors/validation"}