# Oauth1 Conntection to Netsuite REST API

**URL:** https://discourse.nodered.org/t/oauth1-conntection-to-netsuite-rest-api/34114
**Category:** General
**Created:** [12 October 2020 03:08 UTC](https://discourse.nodered.org/t/oauth1-conntection-to-netsuite-rest-api/34114 "2020-10-12T03:08:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Aneets](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@Aneets](https://discourse.nodered.org/u/Aneets)
#### Post date: [12 October 2020 03:08 UTC](https://discourse.nodered.org/t/oauth1-conntection-to-netsuite-rest-api/34114/1 "2020-10-12T03:08:32Z")

</div>

Hi Everyone,  
I am Verry new to Node-red but am loving it. I am working on a project that will take a REST Call from an industrial Device and send the data to Netsuite Rest API using Oauth1.  
have the internal Part working but am having a strange issue when I try to connect using the node-red-contrib-oauth1a node. I am setting the parameters in a function node like this

```auto
msg.payload = {
    consumerSecret:'...................',
    tokenSecret: '..................',
    url: 'https://........suitetalk.api.netsuite.com/services/rest/record/v1/metadata-catalog/customer',
    httpMethod: 'GET',
    parameters: {
        oauth_consumer_key: '..................',
        oauth_token: '..................',
        oauth_signature_method: 'HMAC-SHA1',
        oAuth_realm: '.......',
        }
};
return msg;

```

Sorry I have to remove all the information for security reasons as you can all probably understand.  
When I test this in Postman I get the correct response were as in node-red I only get an "Error: Request failed with status code 401". the only thing that I can think of is that node-red-contrib-oauth1a is adding the authorization data to Request Body/ Request URL, not the request headers.  
@afelix I see you have some experience with Oauth1 can you assist, please?

By the way, I wish I had found Node-Red years ago.

All help is welcomed and much appreciated

Aneets

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [11 December 2020 03:08 UTC](https://discourse.nodered.org/t/oauth1-conntection-to-netsuite-rest-api/34114/2 "2020-12-11T03:08:45Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
