On this page

    1. Home
    2. API
    3. API Reference
    4. Device
    5. Confirm Device Share

    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

    FieldTypeDescription
    +share_codestring
    +associated_network_namestring

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    {
      "associated_network_name": "string",
      "error": {
        "message": "string"
      }
    }

    Fields

    FieldTypeDescription
    associated_network_namestringThe confirmed name of the network associated with the device.
    errorobjectReturned if the confirmation failed (can be null).
    error.messagestringHuman-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
    }


    Powered by Sudoc v2.5.0
    Hide table of contents