Skip to content

Register an application ​

POST /api

Register your application with the gateway to obtain an API credential.

Before sending this request, press the gateway's physical button to open the registration window. Discover the gateway to check that registration is enabled.

Save the username returned in data.obj. You will need it in the application-key header for authenticated requests.

Example request

json
{
  "device_type": "bweetech#cwgk4rns"
}

Parameters ​

FieldLocationTypeRequiredDescription
device_typebodystringYesA client identifier of your choice. Use vendorID#deviceID to make clients easier to identify.

Example response

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "arr": [],
    "obj": {
      "username": "BISyGakszuQEGd4uBM"
    }
  }
}
json
{
  "code": -1,
  "msg": "link button not pressed"
}

Responses ​

Status codeMeaning
200OK

Response fields ​

HTTP 200 OK

FieldTypeRequiredDescription
codeintegerYes0 on success; a negative value on failure.
msgstringYesMessage
dataobjectNoResponse payload.
data.objobjectNoReturned resource.
data.obj.usernamestringNoSave this credential for authenticated requests.