On this page

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

    Confirm Device Adoption

    This endpoint is used to finalize the process of adopting a device into your network. It requires the adopt_code generated during the initiation phase and the adopt_secret that was kept locally. Successful confirmation returns a specific JWT for the newly adopted client.


    POST /device/confirm-adopt

    Finalizes the adoption of a device into the network.

    Request

    POST /device/confirm-adopt

    Headers:

    {
      "Host": "api.bringyour.com",
      "Content-Type": "application/json"
    }

    Body:

    {
      "adopt_code": "string",
      "adopt_secret": "string",
      "associated_network_name": "string"
    }
    FieldTypeDescription
    adopt_codestringRequired. The unique adoption code associated with the device.
    adopt_secretstringRequired. The secret key associated with the adoption code.
    associated_network_namestringOptional. The name of the network the device is being adopted from.

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    {
      "by_client_jwt": "string",
      "error": {
        "message": "string"
      }
    }
    FieldTypeDescription
    by_client_jwtstringThe authentication token specifically for the newly adopted client device.
    errorobjectAn error object if the confirmation failed.
    error.messagestringA descriptive message explaining why the adoption could not be confirmed.

    Example

    HTTP Request

    POST /device/confirm-adopt HTTP/1.1
    Host: api.bringyour.com
    Content-Type: application/json
     
    {
      "adopt_code": "ADOPT-1234-5678",
      "adopt_secret": "super-secret-key-xyz",
      "associated_network_name": "HomeNetwork"
    }

    Successful HTTP Response

    {
      "by_client_jwt": "eyJhbGciOiJIUzI1NiI...",
      "error": null
    }


    Powered by Sudoc v2.5.0
    Hide table of contents