Skip to content

findUserDevice ​

Looks up a user's device using either deviceId or pushToken. See: MRM2-170. If device found in SAM then it calls AWS to check the "Enabled" status in SNS and returns that status in the payload.

Request ​

http
GET rest/user/device

Parameters ​

Query Parameters:

ParameterTypeRequiredDescription
deviceIdstringNoThe unique device id used to register the device.
pushTokenstringNoThe push token of the device

SAMPLE REQUEST

Using deviceId...

curl --location 'https://test-services.interact.technology/rest//user/device?deviceId=43789'
--header 'x-nextinteract-authtoken: ArYi0YGHqFNNLGnhemxA5g=='

Using Push Token..

curl --location 'https://test-services.interact.technology/rest//user/device?pushToken=fUAj2I_atpM4IUykRSJoSp%3AAPA91bH3w94M_uydsGIVWcBmsfgKIs2CyeZv8aYXctb1G7KHldBnqsdfUPl-gHykmwsUmwPS4C8jgl1i4MEY3f_3uqZyhK-gUNOobveEDo5ZeTgyZG-LNa9-rUkh73m7LPN49tlwNh1Y'
--header 'x-nextinteract-authtoken: ArYi0YGHqFNNLGnhemxA5g=='

Response ​

200 OK ​

json
{
    "targetAppCode": "MY",
    "deviceTypeCode": 3,
    "deviceUniqueId": "43789",
    "devicePushToken": "fUAj2I_atpM4IUykRSJoSp:APA91bH3w94M_uydsGIVWcBmsfgKIs2CyeZv8aYXctb1G7KHldBnqsdfUPl-gHykmwsUmwPS4C8jgl1i4MEY3f_3uqZyhK-gUNOobveEDo5ZeTgyZG-LNa9-rUkh73m7LPN49tlwNh1Y",
    "deviceName": "Mac-Intel Mac OS X 10_15_7",
    "deviceEndpointArn": "arn:aws:sns:ap-southeast-2:131338580188:endpoint/GCM/MI-DESKTOP-TEST-PUSH-APP/c32e166f-db8c-347c-b718-62aed67ba24b",
    "deviceEnabled": true
}

Errors ​

ExceptionDescription
WSInvalidParameterExceptionSee Error Definitions
WSInvalidAuthTokenExceptionSee Error Definitions
WSCacheServiceExceptionSee Error Definitions
WSUserServiceExceptionSee Error Definitions