Forum Discussion
Very strange. My API and discord bot is running Linux ubuntu and getting blocked but i can access the api in chrome on the linux box.
Can you show the headers you're using that works?
Hey, sorry for the late reply. This is what I'm currently using:
- p0tvin29294 months agoSeasoned Novice
I never used headers at all and it just worked. It was just a simple curl GET request and got the JSON response from the EA API. Thanks for sharing the headers, I had similar headers but I tried yours and same result (Access Denied) on Linux Ubuntu... So frustrating ..
Below was my CURL request that worked for years until now..
$url = "https://proclubs.ea.com/api/nhl/clubs/search?platform=common-gen5&clubName=M%20E%20N"; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($curl); $status = curl_getinfo($curl, CURLINFO_HTTP_CODE); curl_close($curl); Results >> Access Denied You don't have permission to access "http://proclubs.ea.com/api/nhl/clubs/search?" on this server. Reference #18.94a12b17.1759595149.8197e3ca https://errors.edgesuite.net/18.94a12b17.1759595149.8197e3caI'm pretty good at troubleshooting these issues but this one really doesn't make sense when it works on my chrome browser (Linux) but not with my PHP CURL request or POSTMAN. Works for your Linux but not Windows .. So confusing.
Thanks
- p0tvin29294 months agoSeasoned Novice
Finally got it working!
I got it working with these headers below. Hopefully it helps you guys out too.
$headers = ["Cache-Control: no-cache", "Content-Type: application/json", "User-Agent: PostmanRuntime/7.46.0", "Accept: application/json", "Accept-Language: en-US,en;q=0.5", "Connection: keep-alive"];You might need this as well in headers:
Accept-Encoding: utf8
- PlayoffError4 months agoHero
That got it running for me as well. Seems like the Accept-Language and Connection headers are the keys ( at least for me ). Nice work!
Featured Places
NHL 26 General Discussion
Join the community forums and discuss the latest news and game information around NHL 26.Latest Activity: 11 minutes agoCommunity Highlights
- EA_Aljo5 months ago
Community Manager