Elegoo-Obico Access Token API
The APIs documented on this page are designed for Elegoo partners to manage access tokens for their custom authentication system.
Authentication
All APIs are authenticated by the partner's authentication token in the HTTP request header:
Authorization: Token XXX
подсказка
Please contact Obico team to obtain your partner authentication token.
Endpoint
https://elegoo-app.obico.io/. Production endpoint. Please use this endpoint unless instructed by the Obico team differently.https://elegoo-app-stg.obico.io/. Staging endpoint. Please don't use unless instructed by the Obico team.https://elegoo-cn-app.elegoo.com.cn. Production endpoint within China.https://elegoo-cn-app-stg.elegoo.com.cn. Staging endpoint within China.
POST /ent/partners/api/elegoo/access_token/
Creates a new Elegoo custom authentication record, or updates an existing one if a record with the same serial_no already exists.
подсказка
This endpoint performs an "upsert" operation - it will create a new record if the serial_no doesn't exist, or update the existing record if it does. This allows you to use a single endpoint for both creating and refreshing access tokens.
Request
This POST request should be sent as application/json format.
Body parameters
serial_no(required): A unique identifier for the device. Max 256 characters.access_token(required): The access token for the device. Max 512 characters.expire_in(required): Number of seconds from now until the token expires. Server computesexpired_at.
Example request
{
"serial_no": "ELEGOO_DEVICE_001",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expire_in": 86400
}