Skip to content

Commit 11e9535

Browse files
authored
Add API call information
To save someone else a few hours stuffing around
1 parent 1aed58e commit 11e9535

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

mongoose-os/userguide/licensing.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@ an old license string is returned by the License Manager
3636
but the number of available licenses is not decreased.
3737
Thus a device, once licensed, is licensed permanently.
3838

39+
## API
40+
41+
- You'll need your secret key from the portal
42+
- At a high level, send a POST request to https://license.mongoose-os.com/api/v1/license with your secret key and a JSON formatted object containing the device information
43+
- You can obtain the device information from a Sys.GetUID RPC call to the device
44+
- 'pid' maps to 'type', 'uid' maps to 'device_id', 'app' stays the same
45+
- Sample CURL call:
46+
```
47+
curl --location --request POST 'https://license.mongoose-os.com/api/v1/license' \
48+
--header 'Authorization: Bearer 6db682e2977b746c753e40b4599555' \
49+
--header 'Content-Type: application/json' \
50+
--data-raw '{
51+
"type": "mos",
52+
"device_id": "0f9c93b555a6a555",
53+
"app": "myappsname"
54+
}'
55+
```
3956

4057
## Libraries with restrictions
4158

0 commit comments

Comments
 (0)