cloudflare and api - blocked… what to do ?

There could be some users who are on mobile devices on the edges of cities that border unsupported locations and there are at least some users who are not fully truthful about their location and may be using a VPN… there are also false positives, a combination of those could be your users with issues.

1 Like

Same problems this morning. Seems its common problem… Waiting to fix from OPENAI?

I’m encountering an issue with the error message:
‘openai.error.APIError: HTTP code 403 from API’.

This error only occurs on my all Azure machines and not on Google VMs.
It seems like OpenAI’s Cloudflare firewall might be blocking some cloud service providers, including Azure, or regions.

currently my machine not in https://platform.openai.com/docs/supported-countries and last night still working fine.

Did your machine in the listed countries ?

2 Likes

You are right! I overlooked it!

I’ve checked my machines in Hong Kong, Singapore, and the US, and only the one in Hong Kong is impacted.

Thanks a lot!

1 Like

I’m also using Vercel edge functions and OpenAI blocked one of the regions. not sure how to solve this.

looking at the logs, hkg1 is the culprit so i disabled it:

export const config = {
    runtime: 'edge',
    // https://vercel.com/docs/edge-network/regions#region-list
    regions: [
        'arn1',
        'bom1',
        'cdg1',
        'cle1',
        'cpt1',
        'dub1',
        'fra1',
        'gru1',
        // 'hkg1', ip blocked by openai
        'hnd1',
        'iad1',
        'icn1',
        'kix1',
        'lhr1',
        'pdx1',
        'sfo1',
        'sin1',
        'syd1',
    ],
};
5 Likes

Super useful community information, thank you for sharing.

Thanks you for sharing.
Despite not being a supported country, Hong Kong was working until today. It seems it’s now been blocked via Cloudflare. Sad times.
AFAIK, Azure allows access from Hong Kong, so we could take our business there.

Alternatively, runpod has a much cheaper llama endpoint template, if you can rewrite for compatibility, or insert something in the chain to correct its format to OpenAPI format. Please let me know if you manage to do that.

My server is in Russia and today I also started getting an error when making a request to openai. Too bad…

6 Likes

Same Error even the support team don’t know how to solve this issue.

I had this exact same problem happen to me twice yesterday. I was on a public wifi at a library in the USA.

Luckily the library had a separate WiFi and as soon as I switched to that I was back up and running.

I know this workaround won’t work for some of the edge configurations described in this thread. But it should work if your WiFi’s IP is blocked.

Maybe security feature on the server. What platform are you using the host your data?

The same problem, anyone have solutions?

same problem. All my api and services for openai just return html page with error:

Sorry, you have been blocked

You are unable to access api.openai.com

1 Like

Experiencing the same thing here, on Vercel edge function and got CloudFlare error message with Assistant API.
I wonder would this be OpenAI’s mitigation to the DDoS attack recently.

Hi, do you know how to modify Cloudflare worker to disable hkg and cn region and make it work? Thanks so much.

Thanks i’ve had the same problem with OpenIndexAI hosted on fly dot io. We also had an asian server in HK, working to move region.