Hello,
I’m trying to set a pincode through the web api thanks to a WordPress plugin I’m developping.
I’ve checked Web API Example: Manage PIN-Codes for your Nuki Keypad and for testing use the swagger UI Swagger UI
curl -X 'PUT' \
'https://api.nuki.io/smartlock/17XXXX32/auth' \
-H 'accept: application/json' \
-H 'authorization: Bearer mARDhzj8XXXXD-U.5JWGN-wtoKQgalH8HaBS_iCyNguU' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"allowedFromDate": "2022-08-28T15:53:45.404Z",
"allowedUntilDate": "2022-08-28T15:53:45.404Z",
"allowedWeekDays": 127,
"allowedFromTime": 0,
"allowedUntilTime": 0,
"accountUserId": 3XXXXX6,
"remoteAllowed": true,
"smartActionsEnabled": true,
"type": 0,
"code": 245678
}'
Is answering (I’ve modified token & accountUserId):
{
"detailMessage": "The supplied value '245678' for parameter 'code' is not valid",
"stackTrace": [],
"suppressedExceptions": []
}
Could you please help me to solve this ?
Thank you