> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/connectors-and-instances/patchworks-connectors/netsuite-prebuilt-connector/oauth-1-authentication.md).

# OAuth 1 authentication

## Introduction

When a user chooses to [add a connector instance](/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance.md) using **OAuth 1** authentication, they are required to enter the following credentials: &#x20;

| Credential            | Notes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Consumer key`        | Generated in Netsuite as part of your initial Patchworks integration. For more information see: [Consumer key & consumer secret.](#consumer-key-and-consumer-secret)                                                                                                                                                                                                                                                                                                                 |
| `Consumer secret`     | Generated in Netsuite as part of your initial Patchworks integration. For more information see: [Consumer key & consumer secret.](#consumer-key-and-consumer-secret)                                                                                                                                                                                                                                                                                                                 |
| `Account id`          | This is always the first element of the URL that you can see having logged into NetSuite. For more information see: [Consumer key & consumer secret.](#consumer-key-and-consumer-secret)                                                                                                                                                                                                                                                                                             |
| `Token`               | Generated per user in Netsuite. For more information see: [Token key & token secret](#token-key-and-token-secret).                                                                                                                                                                                                                                                                                                                                                                   |
| `Token secret`        | Generated per user in Netsuite. For more information see: [Token key & token secret](#token-key-and-token-secret).                                                                                                                                                                                                                                                                                                                                                                   |
| `Signature algorithm` | Always set to `sha256`.                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `Signature method`    | Always set to `HMAC-SHA256`.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `Realm`               | <p>For a NetSuite sandbox the <code>accountid</code> shown in NetSuite (as opposed to your NetSuite URL) typically includes an <code>-SB</code> element - for example: <code>1234567-SB1</code>.</p><p></p><p>The <code>realm</code> will be the same value EXCEPT that the <code>-SB</code> element changes from a dash to an underscore. </p><p></p><p>So, an <code>accountid</code> of <code>1234567-SB1</code> becomes <code>1234567\_SB1</code> for the <code>realm</code>.</p> |

## Setting up OAuth 1 authentication

In order to add connector instances for NetSuite using OAuth 1 authentication, you must have completed all generic setup detailed in our [Preparing your NetSuite environment to work with Patchworks](/product-documentation/connectors-and-instances/patchworks-connectors/netsuite-prebuilt-connector/preparing-your-netsuite-environment-to-work-with-patchworks.md) guide.&#x20;

## Finding your credentials

{% hint style="warning" %}
If you are using a custom version of our prebuilt NetSuite connector (i.e. if authentication method and/or endpoint settings have been updated after the original installation), please be aware that your settings and requirements may vary.
{% endhint %}

### Consumer key & consumer secret

If you have followed our [Preparing your NetSuite environment to work with Patchworks](/product-documentation/connectors-and-instances/patchworks-connectors/netsuite-prebuilt-connector/preparing-your-netsuite-environment-to-work-with-patchworks.md) guide, you will have added a Patchworks integration and saved your client credentials (`consumer key`/`client id` and `consumer secret`/`client secret`) to a password manager.&#x20;

If you can't find these credentials, a new set can be generated.

<details>

<summary><img src="/files/JOYoP4EdSu7WJ3CMdAAS" alt="" data-size="line"> Show me</summary>

![](/files/53vi5yxtLCo2zL5TC62O)

</details>

{% hint style="danger" %}
Be aware that if you reset credentials that have already been used to configure Patchworks [connector instances](/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance.md), process flows will fail until you [apply the new credentials](/product-documentation/connectors-and-instances/working-with-instances/updating-an-instance.md).&#x20;
{% endhint %}

### Account ID

This is always the first element of the URL that you can see having logged into NetSuite. For example, with the following URL: \
\
`https://tstdrv1431250.app.netsuite.com/app/center/card.nl?sc=-29&whence=`

...the **account id** would be:\
\
`tstdrv1431250`

<details>

<summary><img src="/files/JOYoP4EdSu7WJ3CMdAAS" alt="" data-size="line"> Show me</summary>

![](/files/tZLVS70mJi8c5MMMtcYA)

</details>

### **Token key & token secret**

A **token key** and **token secret** can be generated for users with a Patchworks integration role. In NetSuite, navigate to `setup` <mark style="color:red;">|</mark> `users/roles` <mark style="color:red;">|</mark> `access tokens`.

These values should be added to a password manager at the time they are generated as they can't be re-accessed in NetSuite. If you can't find these credentials, a new set can be generated.

<details>

<summary><img src="/files/JOYoP4EdSu7WJ3CMdAAS" alt="" data-size="line"> Show me</summary>

![](/files/BjxafnTki8ah07po7aFE)

</details>

{% hint style="danger" %}
Be aware that if you reset credentials that have already been used to configure Patchworks [connector instances](/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance.md), process flows will fail until you [apply the new credentials](/product-documentation/connectors-and-instances/working-with-instances/updating-an-instance.md).&#x20;
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.wearepatchworks.com/product-documentation/connectors-and-instances/patchworks-connectors/netsuite-prebuilt-connector/oauth-1-authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
