# Aspire - NetSuite integration (custom flows) – Regenerate expired security token

**URL:** <https://connective.celigo.com/t/aspire-netsuite-integration-custom-flows-regenerate-expired-security-token/617>\
**Category:** Integrator.io\
**Tags:** authentication, http, security, netsuite\
**Created:** [November 3, 2022, 4:46pm UTC](https://connective.celigo.com/t/aspire-netsuite-integration-custom-flows-regenerate-expired-security-token/617 "2022-11-03T16:46:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kathyanaqueeman](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/kathyanaqueeman/32/9122_2.png) [@kathyanaqueeman](https://connective.celigo.com/u/kathyanaqueeman)\
**Post date:** [November 3, 2022, 4:46pm UTC](https://connective.celigo.com/t/aspire-netsuite-integration-custom-flows-regenerate-expired-security-token/617/1 "2022-11-03T16:46:41Z")

</div>

**Note:** This post only applies to regenerating expired security tokens for an Aspire (HTTP) – NetSuite integration via the [integrator.io API](https://connective.celigo.com/hc/en-us/categories/5915222240155).

To get to this point, you should have already generated a token in Postman and used it in the **Token** field in integrator.io for an initial test. You should have made the API calls to Aspire and seen the data being returned.

## Test the connection

1. Use Aspire's **/Branches** call to test the connection via Postman. You should receive an array of branches where the first Branch is called "Main."
2. Use this response to set the **Success response value** field. 

**Note:** Aspire returns a 401 when a bad token is provided, so you don't need to configure anything in the **How to detect authorization failure** section.

## Configure the Configure refresh token section

1. Configure the **Configure Refresh Token** section, provided you received the information from Postman to get the token in the HTTP request body section.
2. Finally, to validate your configuration, include an invalid token in the **Token** and **Refresh Token** fields – this is done intentionally, so it gets tested immediately.

## Test the connection

1. integrator.io makes an API call to Aspire using the /Branches endpoint.
2. Aspire sends back a 401, which is detected by integrator.io and uses the Refresh token configuration to fetch a real token and store it in the **Token** field.
3. Finally, to encrypt the **Client Id** and **Secret** , navigate to **Advanced** → use the **Encrypted** box to store the credentials so they're hidden and not visible in plain text.
