It seems like the token expires after the first API call. The question is how do i generate an Oauth signature using HMAC-SHA256 in R, if i have client id, secret, consumer key and consumer secret
library(httr)
headers = c(
'Content-Type' = 'Application/JSON',
'Authorization' = 'OAuth realm="586038",oauth_consumer_key="200b3bac************",oauth_token="58a0591cde917e****************",oauth_signature_method="HMAC-SHA256",oauth_timestamp="1708108304",oauth_nonce="r4nRTdCFF7h",oauth_version="1.0",oauth_signature="*********************%2FSZTdJVfNB%2Fm9o%3D"'
)
body = "{\r\n \"query\":\"Select LastName from CONTACT where FirstName='Livio'\"\r\n}"
res <- VERB("POST", url = "https://******.restlets.api.netsuite.com/app/site/**********", body = body, add_headers(headers))
cat(content(res, 'text'))