Cloudflare API Issues

Hi it looks like Cloudflare is currently blocking the default Golang HTTP user agent. Whenever I issue http request from a Go program I only get error code: 1020 as a response. This occurs even when providing a valid API key.

I can reproduce this using cURL as well

> curl -A "Go-http-client/1.1" https://api.tfl.gov.uk/StopPoint/490008899S/Arrivals
error code: 1020

Any change to user-agent resolves this issue, but it’s seem odd to me that an API would block the user agent of well known programming language, especially when the calls are made with a valid API key.

Welcome @AvianLyric

https://www.makeuseof.com/cloudflare-error-1020-access-denied-fix/ has some suggestions.

I’m also wondering if your cacert.pem is configured and accessible.

https://curl.se/docs/caextract.html

Hi @briantist

I’ve DM’d @AvianLyric - hopefully should have it sorted now.

Thanks,
James

1 Like

I have the same issue in a go app.
Adding a user-agent fixed this, but it isn’t a good behavior.
It worked until recently, but now we need to make a change in a prod

1 Like