This is an interesting question. Most of us aren’t familiar with R but it seems that the parameters are correct. I assume you entered your API key correctly?
I wonder if anyone else has any ideas? I think @Romain_Dalston might have some skills in this area? Any other data / R specialists who can assist with this syntax?
So the issue seems to be with the body of the request. Rather than passing the body as a JSON, you can generate the body (somewhat inelegantly) with paste0. This was a pain to get right with all the escaped and control characters, but this seems to work now:
I don’t know if the issue with passing the body as a JSON is an issue with the API or with httr, but whatever variations I tried, I couldn’t get it to work either.