I am trying to find a way to connect to the Appannie API using R using the httr package (having no experience with the API at all). The API requires you to include the request header. Quote from the appannie website: Register an App Annie account and create an API key. Add this key to your request header as follows:
Authorization: citation by a medium
I wrote code that looks like
query <- "http://api.appannie.com/v1/accounts/1000/sales?break_down=application+dat
&start_date=2012-01-01
&end_date=2012-02-01
¤cy=USD
&countries=US
&page_index=1"
getdata<-GET(url=query, add_headers("Authorization: bearer 811b..."))
the http_status (getdata) command shows me a “client error: (401) Unauthorized” someone can help me with this, what am I doing wrong?
source
share