Authentication
Every request you make to MOI Bit requires the authorization token to be sent in headers along with request params.
To obtain the authorization token, developers can either
-
Generate a temporary token from the Settings page under MOI Bit dashboard or
-
Integrate DAT package with your application. Learn more about DAT here.
Sample Request
curl --location 'https://api.zenz.tech/moibit/v1/<endpoint>' \
--header 'Authorization: <DAT Token>'
Authenticate yourselves
{base_url}/developer/:developerID/auth
Request type - GET
Description
This endpoint authenticates whether your are a MOI Bit user or not
Headers
When making a request to this endpoint, you need to include the following header:
- Authorization:
<DAT Token>
For more details on obtaining and using the DAT Token, check out API Overview.
Sample Request
curl --location 'https://api.zenz.tech/moibit/v1/developer/<developerID>/auth' \
--header 'Authorization: <DAT Token>'
- Replace
<DAT Token>
with your actual DAT (DOT Authentication Token). - Replace
<developerID>
with the developer's ID.
Sample Response - OK
{
"code": 200,
"requestId": "555211ca-c352-49ef-930c-b623f170e13b",
"clientMessage": "Authentication successful",
"data": {
"devCompressedPubKey": "035eb954b84771098d22e0dd5bddb56fe3b64e00f6b92b9d9f49c435d52e6f9851",
"devKey": "0x313ac131E92F8B9186935f82a59d297df67A6bb8"
}
}
Sample Response - Error
{
"code": 400,
"requestId": "a445d280-bc68-4e68-b6a3-5d6d89c20e21",
"clientMessage": <client message>,
"error": <error message>
}