OpenAI Assistants API – “No thread found with id” Error During Initialization in API Connector

Title: OpenAI Assistants API – “No thread found with id” Error During Initialization in API Connector

Hi everyone,

I’m integrating the OpenAI Assistants API (v2) with Bubble and running into a 404 error when initializing one of my API Connector calls. I’m hoping someone who has worked with dynamic URL parameters or OpenAI threads can point me in the right direction.

What I’m Trying To Do

I’m setting up a GET call to retrieve messages from an existing OpenAI thread:

GET https://api.openai.com/v1/threads/[thread_id]/messages

How I Have It Configured

  • URL parameter: thread_id

  • Value (for initialization): a real thread from my OpenAI dashboard

  • Header: OpenAI-Beta: assistants=v2

  • Data type: JSON

  • API key header is set correctly and works for other API calls

The Issue

When I click Initialize call, Bubble returns:

Status code 404
{
  "error": {
    "message": "No thread found with id 'thread_XXXXXXXX'",
    "type": "invalid_request_error"
  }
}

The strange part is:

:check_mark: The thread absolutely exists in my OpenAI dashboard.

I can see it in the Threads list with the exact same ID I’m using in the URL parameter.

:check_mark: Other calls (create thread, send message, run assistant) are working fine.

What I’ve Already Checked

  • Verified the thread_id is copied exactly (no spaces, no missing characters)

  • Tried multiple valid thread IDs from OpenAI

  • Recreated the API call from scratch in Bubble

  • Ensured OpenAI-Beta header is present

  • Confirmed the endpoint does not need assistant_id for GET requests

My Question

Is Bubble caching old values during initialization, or is there a known issue with URL parameters inside path segments for nested endpoints like this?

Has anyone successfully initialized:

GET https://api.openai.com/v1/threads/[thread_id]/messages

using the API Connector?

Any guidance, examples, or working screenshots would be greatly appreciated!

2 Likes

Can you share how you set the thread ID? Share a screenshot of API connector

2 Likes

Hey @Tide88 Welcome to the community! I’ve run into this before with OpenAI’s thread endpoints in Bubble. A few things to check:

  1. Path parameters in Bubble: The API Connector sometimes struggles with dynamic values in the middle of the URL path (like [thread_id]). Bubble doesn’t always replace it correctly during initialization. One workaround is to hardcode a real thread ID temporarily just to initialize the call, then swap in the dynamic parameter afterward.
  2. Check API version & headers: Make sure you have OpenAI-Beta: assistants=v2 exactly set in the headers. Missing or incorrect headers can also trigger a 404.
  3. Use full thread URL carefully: Sometimes extra slashes or whitespace in the URL can cause OpenAI to not find the thread, even if it exists in the dashboard.

Basically, Bubble’s initialization can be picky with path parameters, it’s not caching, it’s just trying to validate the endpoint before sending a real request. Once you get it initialized with a hardcoded value, dynamic parameters usually work fine at runtime. Hope this helps.

If this is the case… you should report this as a bug. But never faced this issue on my side.

JICI, thanks for the good energy.

And which thread id are your using? (Did you do a “get” threads to be sure you are using a valid ID?)

Quick update. I was able to work through to a solution. I’m still not sure what the challenge was but I believe it was a combination of backend workflows and picking the wrong thread_id (first vs last). But it is working.

Many thanks to the community.

John

1 Like