Q:

Robinhood Request for Account Information Using Python Requests Module

I am trying to use the Python "requests" module to extract account information from the Robinhood API.     
def account_info():
    header = {"Accept": "application/json"}
    data = {"Authorization": "myactualtoken"}

    url = "https://api.robinhood.com/accounts/"
    r = requests.post(url, data=data, headers=header)
    print r.text
account_info()

This is supposed to work in Curl:
curl -v https://api.robinhood.com/accounts/ \
   -H "Accept: application/json" \
   -H "Authorization: Token a9a7007f890c790a30a0e0f0a7a07a0242354114" #Token Not Real

When I try the Python code I get:
"detail":"Authentication credentials were not provided."

A:

If you look closely it is much easier to figure it out. -H in curl adds a header, so from your curl command (which I assume is working), I can see that Authorization: Token a9a... is being set as a header, but in your python code, you're setting it as the POST data. 
So your solution is to simply set it as a header and remove the POST data part.
header = {
    "Accept": "application/json",
    "Authorization": "Token a9a..."
}

Rest of the part is fine.
Update: You are entirely doing it wrong. I hadn't checked the API docs before, but after having a look at it, I now see that you were entirely doing it wrong. The supported method is GET, while you were making a POST query, exactly the opposite. Plus the GET url has been made specific, the URL has a unique account_id and ends with positions/ endpoint.
So your code would pretty much look like this:
def account_info(): 
    header = {
        "Accept": "application/json",
        "Authorization": "a9a..."
        }
    url = "https://api.robinhood.com/accounts/{account_id}/positions/" 
    r = requests.get(url, headers=header) 
    print r.text 
account_info()

