Bridge - Error with POST call to API - Invalid Body
I'm trying to make a post call to an API using the "Call API" action within Bridge. Unfortunately, every time I try this action, it fails with an "Invalid Payload" response. I've tested the payload in Postman, and it seems to be working correctly.
The API I'm using is a "POST" to a Slack Webhook. (It will automatically post in a specific channel when correctly formatted data is posted to that particular URL.)
I've tried running the body through a Compose String, I've tried pasting it straight into the "HTTP Request Body" field, and I've even tried simplifying it as much as possible, to basically a one word post with no formatting.
Slack Webhook URLs include the auth information in the POST URL, so there is no need to add additional headers.
Screenshot from postman - this works
Best Answer
-
Hey @abrae005
It could be your profile setup that is causing your issues. If you haven't already, please see this help article:
In the article above, note the base url example and the endpoint example. Here's an example of one of my API calls - mine is for a smartsheet routine.
Also, at least for a smartsheet API call, the Content-type and application/json would not be enclosed with quotes. I realize the syntax might be different for Slack API.
Kelly
Answers
-
Hey @abrae005
It could be your profile setup that is causing your issues. If you haven't already, please see this help article:
In the article above, note the base url example and the endpoint example. Here's an example of one of my API calls - mine is for a smartsheet routine.
Also, at least for a smartsheet API call, the Content-type and application/json would not be enclosed with quotes. I realize the syntax might be different for Slack API.
Kelly
-
Thanks @Kelly Moore . Splitting the URL so part of it (everything that was redacted in my screenshot above) is in the "Endpoint" field, and removing the quotes from Content-Type and Application/json seems to have done the trick.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives