Hello,
I'm working on a small project to acquire information from regulations.gov using their API. It's fairly simple (codewise) what I'm trying to do. However, I get stuck with a "HTTP error 403: Forbidden". It means I'm connecting, but something seems to be the matter.
I've been in contact with the people working on the API. They said that my API and Accept header call are fine. I don't know what the problem is. Here is the code:
import urllib2
from json import load
url = 'http://api.data.gov:80/regulations/v3/documents.json?api_key=API_KEY'
request = Request(url, headers={"Accept":"application/json;charset=UTF-8"})
response = urlopen(request)
json_obj = load(response)
In essence, the problem is at the urlopen() request. Any pointers would be a great help. Also, you can go here to acquire an API key: https://api.data.gov/signup/