I am trying to connect to an API endpoint but am having trouble figuring out where to input my API key. I receive an error that tells me that my API key is missing when I have attempted to add it to the GET request. Could someone please tell me what I am doing wrong.
key = "xxxxxxxxxxxxxxxxxxxxx"
url = "https://api-football-v1.p.rapidapi.com/v2/predictions/1574778f3"
result = GET(url, add_headers('Authorization' = paste("Auhtorization: ", key)))
content(result)
There error I receive is as follows: $message [1] "Missing RapidAPI application key. Go to https://docs.rapidapi.com/docs/keys to learn how to get your API application key."
The link you posted seems to state that RapidAPI is looking for a header named "X-RapidAPI-Key" for their API key. Have you tried that instead of using an authorization header? Also, you have Authorization spelled incorrectly in the paste method call which could be part of your issue.