Turn remote access on
const url = 'http://127.0.0.1:7700/api/remote';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"rosa"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:7700/api/remote \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "rosa" }'Owner only. Asks the relay to enroll name, starts the tunnel and a Let’s Encrypt certificate on the
box, and returns at once with state: starting. Poll GET /remote until connected, which takes 5
to 60 seconds for a new certificate. TLS ends on the box, so the relay cannot read the traffic.
Requests through the address carry X-Forwarded-For, so they need a device token like any outside
request.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Lowercase letters, digits and single hyphens, not at either end. The relay reserves some names.
Example
{ "name": "rosa"}Responses
Section titled “Responses”The state, usually starting.
object
The box’s own https address.
Why it failed, in words. If the relay no longer holds this box’s name (freed after 30 days offline, or given to another computer), it says to turn remote access off and on again.
The relay’s host name.
Example
{ "state": "off"}A bad name.
object
What went wrong
Example generated
{ "error": "example"}The owner’s route, called by someone who is not the box’s own screen or a device paired as the owner.
object
What went wrong
Example
{ "error": "only this computer's own screen or the owner's paired device can do this"}The name is taken or reserved, or this box already has another name. Turn remote access off first to change it.
object
What went wrong
Example generated
{ "error": "example"}The relay is rate limiting this box.
object
What went wrong
Example generated
{ "error": "example"}The relay cannot be reached, or sent an answer the box does not accept.
object
What went wrong
Example generated
{ "error": "example"}