Skip to main content
Solved

Time out error

  • Jun 21, 2024 3:33 PM UTC
  • 12 comments
  • 1049 views

yasabyr

My API sends responds back but sometimes it needs a little bit more time to process data and answer. I checked my logs the answer from my server was sent but it was too late for many chat to wait

I tried to add delay method in the many chat but it didn’t work.

Can I adjust responds wait time?

Best answer by Gustavo Boregio

Unfortunately there's nothing we can do about.

External requests timeout at 10 seconds (except for requests to OpenAI.com).

If your API takes more than that, you have 2 options:

  1. Make your API faster
  2. If that's not possible, you need to create an asynchronous logic where you send the information and get a 200 OK immediately (no delay). Your API then set custom fields with the response and triggers the response flow to the user. It's a pain in the butt and a lot of work to get this going, but it works...
View original

12 replies

Gustavo Boregio
Forum|alt.badge.img+7
  • Community Moderator & Expert
  • Answer
  • Jun 21, 2024 5:11 PM UTC

Unfortunately there's nothing we can do about.

External requests timeout at 10 seconds (except for requests to OpenAI.com).

If your API takes more than that, you have 2 options:

  1. Make your API faster
  2. If that's not possible, you need to create an asynchronous logic where you send the information and get a 200 OK immediately (no delay). Your API then set custom fields with the response and triggers the response flow to the user. It's a pain in the butt and a lot of work to get this going, but it works...

yasabyr
  • Author
  • Up-and-comer
  • Jun 24, 2024 7:54 AM UTC

Unfortunately there's nothing we can do about.

External requests timeout at 10 seconds (except for requests to OpenAI.com).

If your API takes more than that, you have 2 options:

  1. Make your API faster
  2. If that's not possible, you need to create an asynchronous logic where you send the information and get a 200 OK immediately (no delay). Your API then set custom fields with the response and triggers the response flow to the user. It's a pain in the butt and a lot of work to get this going, but it works...

Where do I send my message back? I haven’t seen that manychat provides a callback url


yasabyr
  • Author
  • Up-and-comer
  • Jun 24, 2024 8:19 AM UTC

Unfortunately there's nothing we can do about.

External requests timeout at 10 seconds (except for requests to OpenAI.com).

If your API takes more than that, you have 2 options:

  1. Make your API faster
  2. If that's not possible, you need to create an asynchronous logic where you send the information and get a 200 OK immediately (no delay). Your API then set custom fields with the response and triggers the response flow to the user. It's a pain in the butt and a lot of work to get this going, but it works...

Can’t I write any logic in many chat to fix this?


Gustavo Boregio
Forum|alt.badge.img+7
  • Community Moderator & Expert
  • Jun 24, 2024 10:53 AM UTC

You have to use the API:

https://api.manychat.com/swagger#/


yasabyr
  • Author
  • Up-and-comer
  • Jun 24, 2024 12:33 PM UTC

You have to use the API:

https://api.manychat.com/swagger#/

Which API should I use? I tried all from sending but can’t understand which one about instagram and which id they need for instagram 


chemjmmm
  • Smooth talker
  • Feb 26, 2025 5:13 PM UTC

Hi ​@Gustavo Boregio what is the expected format for “otn_topic_name” and “data” in the request for the endpoint /sending/sendContent in the API?


Gustavo Boregio
Forum|alt.badge.img+7
  • Community Moderator & Expert
  • Feb 26, 2025 5:28 PM UTC

​@chemjmmm check the documentation:

 

It’s all detailed there ;)


chemjmmm
  • Smooth talker
  • Feb 26, 2025 5:29 PM UTC

​@Gustavo Boregio as other members, I get a “success” status, but i don’t receive any message.  I am trying to send a message through IG. I have looked at https://manychat.github.io/dynamic_block_docs/channels/ for templates on IG messages


Gustavo Boregio
Forum|alt.badge.img+7
  • Community Moderator & Expert
  • Feb 26, 2025 5:38 PM UTC

​@chemjmmm is the user inside the 24 hours?


chemjmmm
  • Smooth talker
  • Feb 26, 2025 5:38 PM UTC

​@Gustavo Boregio Yep


Gustavo Boregio
Forum|alt.badge.img+7
  • Community Moderator & Expert
  • Feb 26, 2025 5:48 PM UTC

Then most likely you’re doing something wrong ​@chemjmmm :(

Happy to jump on a troubleshooting call if you’d like.

You can book it on this link. (and we can speak Spanish also if you prefer)


masteromar
  • Up-and-comer
  • Sep 9, 2025 3:49 PM UTC

This Workaround may help you guys...

I am using a polling approach and it is working for me.
My external requests go to voiceflow (the tool I use to build my ai agents), my agents sometimes run other functions and API requests behind the scenes before responding so it usually takes more than that Manychat’s lame 10 seconds native time out to respond

After running the request, I added a condition to check if the mapped-out variable is unknown. If it is unknown, it waits 10 seconds to make sure that the agent generated his response and then it sends the same request again but this time with a static message in the payload asking my agent to resend his last response. This time, the agent doesn’t do anything but resending his last response so it’s a lot quicker than he did generating the response.  the variable is now known so the automation carries on..

 

P.S. It is a loop so don’t forget to handle errors ..