SmartThings Community

While creating smartApp ,it response with error code 422


(Crossasyst Technologies) #1

SmartThing Api: https://api.smartthings.com/v1/apps
RequetsBody:
{
“appName”: “Testingapp”,
“displayName”: “Abc”,
“description”: “Abc”,
“singleInstance”: false,
“appType”: “WEBHOOK_SMART_APP”,
“webhookSmartApp”: {
“targetUrl” : “https://17ecbf03.ngrok.io/v1/appresponse
}
}

Header:
Authorization: bearer+Token
Content_type: application/json

Response: 422
{
“requestId”: “FEB11822-EB8E-44FF-BAAC-D9DA39F55527”,
“error”: {
“code”: “ConstraintViolationError”,
“message”: “The request is malformed.”,
“details”: [
{
“code”: “TargetTimeoutError”,
“target”: “https://17ecbf03.ngrok.io/v1/appresponse”,
“message”: “Upstream target timed out”,
“details”:
}
]
}
}

please give the solution to solve this error…


(Tony Fleisher) #2

Your target url is invalid or has errors.


(Crossasyst Technologies) #3

Just check it on postman with POST request.
It has OK response.


(Eric Rodewald) #4

At the time of app creation, that URL needs to be able to respond to a POST request “PING” challenge. This would indicate that the SmartThings servers did not receive a response at that URL.