Add a device to a user
Path parameters
userIdstringRequired
The id of the user
deviceIdstringRequired
The id of the device to add.
Header parameters
Brand-URLstringRequiredExample:
The brand URL of the request. This is used to identify the brand.
YOUR_BRAND_URL
Auth-KeystringRequiredExample:
This is used to authenticate the request. If the request is not authenticated, the server will return a 401 Unauthorized response.
YOUR_AUTH_KEY
Body
This class provides the add a device to a user.
tokenstring | nullableOptional
The token of the device data. This token is used when push notification for the device.
sessionstring | nullableOptional
The session of the device data and related with user.
tagsstring | nullableOptional
The tags of the device.
userDeviceStatusstring · enumOptionalPossible values:
Responses
201
The request was successful.
application/json
401
The user is not authorized to access the requested resource. The request is missing the required Auth-Key header.
application/json
404
The user was not found in the database.
application/json
409
The device has already been added for this user.
application/json
429
The user has exceeded the rate limit.
application/json
post
POST /api/v1/users/{userId}/devices/{deviceId} HTTP/1.1
Host: protocol.jframework.io
Brand-URL: text
Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 80
{
"token": "text",
"session": "text",
"tags": "text",
"userDeviceStatus": "0 - Offline"
}
{
"success": true,
"statusCode": 201,
"message": "The request was successful.",
"data": true,
"errors": []
}
Last updated
Was this helpful?