pnikic's blog

By pnikic, history, 4 weeks ago, In English,

Hi,

I'm using the codeforces API to collect data about contestants from my university. We have an internal leaderboard where we display it.

Lately, our leaderboard is not working. I've been receiving '403 — Forbidden' responses. (See image: https://imgur.com/3Zy1PIa) I get a positive response when I open the link in the browser. (See for yourself: https://codeforces.com/api/user.info?handles=mblazev;Tantor;pnikic;ajovanov;markotee;Tomx;;heon;Kadak;pkelava )

Any help?

 
 
 
 
  • Vote: I like it  
  • +17
  • Vote: I do not like it  

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Besides the usual '403 — Forbidden', sometimes I'm also getting the '503 — Service Temporarily Unavailable' (See image: https://imgur.com/dx7frDF)

I still get a positive response whenever I open the link in the browser.

Any ideas?

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    status code — 403- The server understood the request but refuses to authorize it. It might be because you are calling this API from an IP from where it's not able to authorize the request. Are you making the browser request from the same server(IP) you are calling in the terminal (that photo you shared)?

»
2 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Increasing the time between successive requests (to 2 seconds) seems to have solved the problem.