RE: I am trying to use Restlet api using oauth 1.0 and i am getting this issue

I am trying to use Restlet api using oauth 1.0 and i am getting this issue


I am trying to create sales order using restlet api, how can i paas authentication using nodejs?

Add Comment
19 Answers

what contents you are looking for ? Is that the whole function?

below i writing down the whole function please check this,if you found any error please let me know-

const SyncNewOrdersWithRestlet = async function (req, res) {
constRestletConfig = awaitgetConfig();
letdata_array = {…}
console.log(RestletConfig.NONCE, “with encoding”, encodeURIComponent(RestletConfig.SIGNATURE))
console.log(“Timestamp”, RestletConfig.TIMESTAMP)
letconfig = {
headers: {
Authorization:`OAuth oauth_consumer_key=”${RestletConfig.CONSUMER_KEY}”,oauth_nonce=”${RestletConfig.NONCE}”,oauth_signature_method=”HMAC-SHA256″,oauth_token=”${RestletConfig.TOKEN_ID}”,oauth_timestamp=”${RestletConfig.TIMESTAMP}”,oauth_version=”1.0″,oauth_signature=”${encodeURIComponent(RestletConfig.SIGNATURE)}”`,
“Connection” :”keep-alive”
// realm=”${RestletConfig.ACCOUNT_ID}”
// return false
axios(config).then(async () => {
// console.log(“————–“,response);
console.log(“ORDER SYNC SUCCESS”);
}).catch(({ response }) => {
// console.log(“FAILED”);
console.log(“here response started”,response);
module.exports.SyncNewOrdersWithRestlet = SyncNewOrdersWithRestlet;
Rookie Answered on February 3, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.