How to Configure Thing to Work Only With One Device IMEI?

This guide will show you how you can Enable and Disable Master IMEI settings for your SIM card, in order to limit the SIM card usage by device IMEI.

First step will be for us to get "cas" value that will confirm that our Thing settings are up to date, please use following request:

curl -X GET "https://console.monogoto.io/thing/<<<_THING_ICCID_IC_>>>/" -H "accept: application/json" -H "Authorization: Bearer <<<_TOKEN_HERE_>>>"

Please note that the above shown command needs to be replaced with information:<<<_THING_ICCID_ID_>>> - replace with ThingId_ICCID_ABC, where ABC is your thing ICCID. Example: ThingId_ICCID_8912372646888991 <<<_TOKEN_HERE_>>> - replace with your token. You may obtain Token, by running Login Token API command. If needed this API can be tested and used in the Monogoto portal following this path: Thing GET /thing/{ThingId}/

Request example:

curl -X GET "https://console.monogoto.io/thing/ThingId_ICCID_8912372646888991/" -H "accept: application/json" -H "Authorization: Bearer eyJhb6IkpXVCJ9.eyJSb2xlIjoiVXN4lclByb2ZpbGVJZF9kZGM2MThhNC0wNTI1LTQ2MmUtYWN3NzhhMGQxYmbSI6Im4zgFkbWluIiwiQ3VzdG9tsbCwiVXNlcklkIjoiVklkXzg5Yj5Y2OGEyUtNDQThhLTEzZjA0MzJhZDE3YyINTAzgZmUtZGI51My00ZjRiLTktN2U5Yjc0ZWU1ZThlIiwiaWNzM3MjI5L2MDY3NTE2Mjl9.99aSLzP7kTgK6TZGW-xalrMu0GkW6viunt3XxbNng"

Expected result showing "cas" value:

...
"State": "ACTIVE",
"Status": "Serving",
"SubProfId": "SubProfId_5652ayf1-er9c-4914-a60b-630cc4af0a2b",
"ThingId": "ThingId_ICCID_8912372646888991",
"Type": "MobileSubscriber",
"VcsAccountId": null,
"cas": 1236781245913489491,
"ActualUsage": {
"MO_SMS_CDR_": 3,
"Data_": 45919688,
"Voice_": 0,
"Alarm": 0
...

Second step will be to update Thing settings, please use following request:

curl -X PUT "https://console.monogoto.io/thing/update/" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer <<<_TOKEN_HERE_>>>" -d "{\"cas\": \"<<<_CAS_HERE_>>>\",\"ThingId\": \"<<<_THING_ICCID_ID_>>>\",\"LockMasterImei\": <<<_MASTER_IMEI_STATE_>>>,\"MasterIMEI\": \"<<<_DEVICE_IMEI_>>>\"}"

Please note that the above shown command needs to be replaced with information: <<<_TOKEN_HERE_>>> - replace with your token. You may obtain Token, by running Login Token API command. <<<_CAS_HERE_>>> - replace with your Thing "cas" value from first step. <<<_THING_ICCID_ID_>>> - replace with ThingId_ICCID_ABC, where ABC is your thing ICCID. Example: ThingId_ICCID_8912372646888991 <<<_MASTER_IMEI_STATE_>>> - replace with true or false value, depending on what you want to do: true - Enable Master IMEI limitation to allow only our entered device IMEI to get SIM card services. false - Disable Master IMEI limitation to allow all devices to work with this Thing. <<<_DEVICE_IMEI_>>> - replace with the device IMEI you want to work with this Thing. Please note that you can send empty value in order to remove Master IMEI value. If needed this API can be tested and used in the Monogoto portal following this path: Thing PUT /thing/update/

Request example:

curl -X PUT "https://console.monogoto.io/thing/update/" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhb6IkpXVCJ9.eyJSb2xlIjoiVXN4lclByb2ZpbGVJZF9kZGM2MThhNC0wNTI1LTQ2MmUtYWN3NzhhMGQxYmbSI6Im4zgFkbWluIiwiQ3VzdG9tsbCwiVXNlcklkIjoiVklkXzg5Yj5Y2OGEyUtNDQThhLTEzZjA0MzJhZDE3YyINTAzgZmUtZGI51My00ZjRiLTktN2U5Yjc0ZWU1ZThlIiwiaWNzM3MjI5L2MDY3NTE2Mjl9.99aSLzP7kTgK6TZGW-xalrMu0GkW6viunt3XxbNng" -d "{\"cas\": \"1236781245913489491\",\"ThingId\": \" ThingId_ICCID_8912372646888991\",\"LockMasterImei\": true,\"MasterIMEI\": \"86696204060123456\"}"

Expected response:

Thing undefined successfully saved.