Accessing data from API's using rstudio

Tags: #<Tag:0x00007fc8bdab1db8>

Hi,

Please suggest a work around to access data from an api which has an auth key

Api - https://digitalapi.blablabla
Api auth key - “blablabla”

library(httr)
capture.output(
with_verbose(POST(url = "[https://digitalapi.blablabla],
Authorization=“blablabla”,
body = “foo”,
content_type(“application/json”))
), type = “message”)

I tired this code but it does not give me the data I am after. Also, what is the work around to get the data in tabular format?
TIA,
Cheers,
Div