User handling:
Registration
A user needs to be registered to our backend and request a unique license code. We require a unique ID (can be an e-mail address or a generated uuid) that matches the user.
Request URL: https://api.wearnotch.com/v2/license/
Request body:
{
"size_allowance": "18",
"flags": [],
"app_code": "app specific code",
"remote_user": "unique id"
}
Example result:
{
"license_code": "12345678abcdefg",
"pairing_code": "01234asdf",
"remote_user": "unique id",
"app_code": app specific code,
"restriction": "sandbox",
"timestamp": "2017-06-20T14:49:02.689115Z",
"size_allowance": 18,
"flags": []
}
The license_code
will be used at specific points to interact with the Notch backend.
At every start, the notch service needs to be configured with your valid license code:
service.setLicense(license: "12345678abcdefg")
The license code is permanent, so it can be saved, and use it for logging in later offline.