Forum Academy Marketplace Showcase Pricing Features

API Workflow Header requirements

I am trying to trigger an API workflow externally using an IOT device. I have not successfully connected to the API from the IOT device but can easily do so from online API testing sites.

I sent a request from the IOT device and from REGBIN to Webhook.site to compare them. The only difference that I can find between the Device POST and the Testing Site POST is a few header items.

Does anyone know if there are specific header items that are required to trigger the API workflows? Also is there a specific port that I should use for the request? The IOT device default is 443. Any help is greatly appreciated

Headers from IOT device
content-length: 17
content-type: application/json
host: webhook.site:443
connection: close

Headers from Testing Site
connection: close
content-length: 17
x-real-ip: 174.250.56.3
content-type: application/json
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
accept-encoding:deflate, gzip
accept :*/*
host: webhook.site

Do you have any error from iOT device?
I don’t know if Bubble aks for that, but a lot of API expect user-agent header

The iOT device says +CME ERROR: connection failed

Does the user-agent value matter as long it has a key value pair?

Normally it doesnt matter. It’s more to know the origin of the request.
Did you check your settings like API key? and be sure your request is correct?
I suggest that you send the request from iOT to a requestbin.com that will help you inspect the payload sent to Bubble, not just the header

Thanks so much for your help! Just tried adding user-agent: IP to the header which did not make any difference.

Right now I have authentication turned off, so there is no API key needed right?

The payload appears to be exactly the same in requestbin/pipedream.