View Single Post
  #10   Spotlight this post!  
Unread 28-05-2016, 19:04
jtrv's Avatar
jtrv jtrv is offline
github.com/jhtervay
AKA: Justin
FRC #2791 (Shaker Robotics)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Latham, NY
Posts: 146
jtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to all
Re: Need help with X-TBA-App-Id Header for TBA API

Quote:
Originally Posted by Cabey4 View Post
Hi, I had this same problem a while ago, where it would give me error 403, forbidden.

I found that I had to add a header called 'User-Agent' with "Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11)Gecko/20071127 Firefox/2.0.0.11" to make it think it was a web browser and wouldn't get blocked.

My code for my (python) thingy is https://github.com/Cabey4/4613-Auto-Scout
but it looks like you've already sorted it. But if anyone else gets a 403 forbidden error with the TBA/The Blue Alliance api that's probably why.
You can make things a hell of a lot simpler with the requests library. Just make sure you do
Code:
pip install requests
to install it and suddenly you've made everything loads easier (example).
__________________
2791 (2012-2017)
Reply With Quote