Confirm Device Share
The confirm-share endpoint is used by the guest network to finalize the device sharing process. After a share_code has been generated by the owner, the guest network calls this endpoint to complete the association.
POST /device/confirm-share
Finalizes a pending device share using a share code.
Request
POST /device/confirm-share
Headers:
{
"Host": "api.bringyour.com",
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_JWT_TOKEN"
}Body:
{
"share_code": "string",
"associated_network_name": "string"
}Fields
| Field | Type | Description |
|---|---|---|
| + | share_code | string |
| + | associated_network_name | string |
Response
200 Success
Status: 200 OK
Content-Type: application/json
{
"associated_network_name": "string",
"error": {
"message": "string"
}
}Fields
| Field | Type | Description |
|---|---|---|
associated_network_name | string | The confirmed name of the network associated with the device. |
error | object | Returned if the confirmation failed (can be null). |
error.message | string | Human-readable explanation of why the confirmation failed. |
Example
HTTP Request
POST /device/confirm-share HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Authorization: Bearer YOUR_JWT_TOKEN
{
"share_code": "SHARE-1234-5678",
"associated_network_name": "GuestNetwork01"
}Successful HTTP Response
{
"associated_network_name": "GuestNetwork01",
"error": null
}