Forum Discussion
36 Replies
- p0tvin29291 day agoSeasoned Novice
Hey sorry I didnt see your reply until now. One of the API URL I use is:
https://proclubs.ea.com/api/nhl/clubs/search?platform=common-gen5&clubName=M%20E%20N
I just started seeing Access Denied again when trying to get these with my web server but it works fine in POSTMAN with the same headers... can anyone provide headers that are currently working for them?
- EA_Aljo4 months ago
Community Manager
Edit: Disregard that API URL request since the workaround you all are using appears to resolve this.
Hey, everyone. Can you give me the API URL you're using to pull the stats? Thanks!
- Nesb04 months agoNew Novice
Just tried these headers and can confirm it works on my end too! Awesome stuff.
- p0tvin29294 months agoSeasoned Novice
Nice! We should create a discord group for us developers to help each other out 😉
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!
- 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
- 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
- Nesb04 months agoNew Novice
Hey, sorry for the late reply. This is what I'm currently using:
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36',"Upgrade-Insecure-Requests": "1","DNT": "1","Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","Accept-Language": "en-US,en;q=0.5","Accept-Encoding": "gzip, deflate",'Referer': 'www.ea.com'I never used to use the referer header, but a long while ago I had encountered the 403 error and adding that seemed to fix it.Keep in mind though, those headers are currently not working for me on my Windows PC. But they are for my Linux PC.No idea how or why. - p0tvin29294 months agoSeasoned Novice
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?
Featured Places
NHL 26 General Discussion
Join the community forums and discuss the latest news and game information around NHL 26.Latest Activity: 2 minutes agoCommunity Highlights
- EA_Aljo5 months ago
Community Manager