r-lib / httr

httr: a friendly http package for R
https://httr.r-lib.org
Other
986 stars 1.99k forks source link

RapidAPI - Status 401 #692

Closed seb-29 closed 1 year ago

seb-29 commented 3 years ago

Hello! I am trying to access a RapidAPI as follows:

library(httr) url <- "https://extract-news.p.rapidapi.com/v0/article" queryString <- list(url = "https://www.theverge.com/2020/4/17/21224728/bill-gates-coronavirus-lies-5g-covid-19") response <- VERB("GET", url, addheaders(x_rapidapi_key ="my-api-key", x_rapidapi_host = "extract-news.p.rapidapi.com"), query = queryString, contenttype("application/octet-stream")) content(response, "text")

However, I get the following error message:

Status: 401

Could you please help me solve this issue? Thanks a lot in advance!

hadley commented 1 year ago

That typically implies that something has gone wrong with your auth.