SwitchBotAPI icon indicating copy to clipboard operation
SwitchBotAPI copied to clipboard

Webhook Setup fails with 190

Open rcoundon opened this issue 1 year ago • 8 comments

Current Situation

I am trying to configure a webhook via the API but I just get a return code of 190

I can poll the other APIs for data from my devices but using the same authorization approach I'm not able to set up a webhook.

The response payload is

{
  "statusCode": 190,
  "body": {},
  "message": "webhook is exist"
}

My original request to /setupWebhook was

{
  "action": "setupWebhook",
  "url": "https://randomstring.lambda-url.eu-west-2.on.aws",
  "deviceList": "ALL"
}

I have never tried to set up a webhook until now so if that message means there already is a webhook, I'm confused. Also, because of that message I tried to call queryWebhook but that just returns:

{
  "statusCode": 190,
  "body": {},
  "message": ""
}

Logs

N/A

Configuration

N/A

Environment

  • OS: Mac Sequioa
  • Software: Postman
  • Node: 22.14.0
  • npm: 11.1.0

Additional Context

No response

rcoundon avatar Feb 21 '25 18:02 rcoundon

and, did you try to delete the webhook ?

Larsene avatar Feb 24 '25 07:02 Larsene

and, did you try to delete the webhook ?

Yes, I just get

{
  "statusCode": 190,
  "body": {},
  "message": ""
}

rcoundon avatar Feb 24 '25 09:02 rcoundon

Any thoughts on this?

rcoundon avatar Mar 06 '25 12:03 rcoundon

Sorry, to nudge but I've no idea if this is being investigated?

rcoundon avatar Mar 18 '25 14:03 rcoundon

I'm not able to reproduce that ...

Larsene avatar Mar 19 '25 09:03 Larsene

If I send this payload

{
  "action": "setupWebhook",
  "url": "https://<REDACTED>.lambda-url.eu-west-2.on.aws",
  "deviceList": "ALL"
}

I get

{
  "statusCode": 190,
  "body": {},
  "message": "webhook is exist"
}

If I send

{
  "action": "deleteWebhook",
  "url": "https://<REDACTED>.lambda-url.eu-west-2.on.aws"
}

I get

{
  "statusCode": 190,
  "body": {},
  "message": ""
}

Could it be the format of the URL that is problem? I.e there are multiple sections - service identifier, AWS region, top level domain?

rcoundon avatar Mar 19 '25 10:03 rcoundon

I'm experiencing the same issue and am unable to set or delete webhooks. Additionally, I can't register URLs that haven't been previously added.

YasuChiba avatar Mar 27 '25 12:03 YasuChiba

Please can we have an update on this, it's been over 2 months since I logged the issue? Is the API even a supported feature for this premium product?

It's not like this is Open Source Software, it's an API provided for a product set that comes with a substantial cost, for which I've provided glowingly positive reviews to your marketing team but I am seriously considering retracting that due to the lack of response here.

rcoundon avatar Apr 13 '25 14:04 rcoundon

I also experienced this issue, unable to delete or update the webhook with V1.1. But I was stunned it worked with V1! Switchbot please fix this!

mayerwin avatar Feb 13 '26 20:02 mayerwin

In the meantime, here's a script you can use to delete the webhook (make sure to select V1): https://gist.github.com/mayerwin/018ed9141707d3289a0e762170878e83

mayerwin avatar Feb 13 '26 20:02 mayerwin