Issue with creating Threads - 403 Forbidden error

I’m currently working with the assistant API, and the following API request work using the HTTP interface:

  • Creating an assistant
  • adding a message to a thread
  • creating a run with the assistant and the thread
  • getting a list of messages on the thread

The only problem is, when I simply try to create a thread using the HTTP interface, I get a 403 forbidden error. The only work around for this, is that I need to go to the Playground and create the thread there.

I create the thread within the playground, I can grab the thread ID and continue on with the conversation simply using the HTTP interface.

Any idea what could be the problem?

API calls will be blocked if made from an unsupported country. That’s my first thought.

Otherwise, typically forgetting to use a valid key, or throwing a bad organization or project environment variable into the API request automatically.

Check the message returned with the API error.

hi, thanks for the suggestions.

I’m in a valid country, and the requests to create threads literally worked yesterday.

Once I get a valid thread_id from the Playground, all the other requests to the interface work:

/v1/threads/

I can add messages, create runs, and view messages from the assistant all with my HTTP POST requests. This is why I’m perplexed.

Nevermind.

It now works for some reason. :woman_shrugging:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.