Tunploy
APIReferenceDevices

Make a share link for a device

POST/devices/{id}/share

A link to a page where the device's owner sees its QR code and config, how much data it has used and when its access ends, without signing in. The page always shows the current config, so it keeps working after the device is moved. Anyone with the link can use the config, so send it only to the owner.

A device has one link: making a new one stops the old one working. Opening an expired link shows nothing.

Needs the devices:write scope.

Authorization

apiKey
AuthorizationBearer <token>

An API key: tp_….

In: header

Path Parameters

id*integer

Device ID.

Range1 <= value

Header Parameters

Idempotency-Key?string

A retry with the same key within 24 hours gets the first reply back (with Idempotent-Replayed: true) instead of running again.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/devices/1/share" \  -H "Content-Type: application/json" \  -d '{}'
{  "url": "https://panel.example.com/share/7QK3M2XWJH4DAVZ6NBTPLCRE5Y",  "expires_at": "2019-08-24T14:15:22Z"}