Error 422 while creating a PINCode for a keypad & smartlock 3.0 Pro

Hey folks,

probably like a lot of you guys I am trying to build a small application that sends opendoor and createPIN requests. Open door works fine. But when I try to send a smartlock/auth request I get strange behaviours. Any idea is highly appreciated:

Calling the request from Swagger works fine:

curl -X 'PUT' \
  'https://api.nuki.io/smartlock/18051XXXXXX/auth' \
  -H 'accept: application/json' \
  -H 'authorization: Bearer XXXXXXXXX.YYYYYYYYY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "HelloWorld",
  "allowedFromDate": "2022-12-17T15:45:12.243Z",
  "allowedUntilDate": "2022-12-19T15:45:12.243Z",
  "allowedWeekDays": 127,
  "allowedFromTime": 0,
  "allowedUntilTime": 0,
  "accountUserId": 781XXXXXX,
  "remoteAllowed": true,
  "smartActionsEnabled": true,
  "type": 13,
  "code": 483712
}'

works nice. 

However, doing the same thing in a windows cmd window:

curl https://api.nuki.io/smartlock/18051XXXXXX/auth -X "PUT"  -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" -d "{ "name": "HelloWorld", "allowedFromDate": "2022-12-18T11:00:00.000Z", "allowedUntilDate": "2022-12-20T10:00:00.000Z", "allowedWeekDays": 127, "allowedFromTime": 0, "allowedUntilTime": 0, "accountUserId": 781XXXXXX, "remoteAllowed": true, "smartActionsEnabled": true, "type": 13, "code": 483712 }"

gives some mystic error message:

![image|690x38](upload://68R3HhJHtZ0wIFZamEAMSWUQD7N.png)

{"code":422,"description":"The server understands the content type of the request entity and the syntax of the request entity is correct but was unable to process the contained instructions","homeRef":"/","reasonPhrase":"Unprocessable Entity","uri":"http://www.webdav.org/specs/rfc2518.html#STATUS_422"}

Trying this now for a while. What is wrong in doing this?

Tnx, Thore

Hi @thore1 , I am getting the exact same error message. Did you manage to fix it?