oAuth: Secure Communications with the Net-Results API

The Net-Results API supports secure communication via oAuth version 2 and supports the Authorization Code grant type.

oAuth is an open protocol to allow secure authorization in a simple and standard method from web, mobile and desktop applications.

Registering an oAuth Client

  • Navigate to the “oAuth Clients” page in Net-Results
  • Click on “Register oAuth Client” in the sub-navigation bar. You’ll see that two fields, “Client ID” and “Client Secret”, are both pre-filled.
  • Enter a description in the 3rd field. This is to help you identify the app or integration that will use this oAuth client to communicate with your Net-Results account. We suggest you use a description that will be recognizable to yourself and others in your organization.
  • Click “Save”.

You’ve now created an oAuth client. You may create as many clients as you need.

It’s common to create additional clients for each app that needs to communicate with Net-Results. This allows you to manage or disable those apps’ ability to communicate with Net-Results individually.

Retrieving an Access Token

Now that you’ve created an oAuth client, you’ll need to use your client_id and client_secret to retrieve an access_token. This is accomplished by making an HTTP request of the form below:

https://apps.net-results.com/app/Oauth/authorize?client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&response_type=token&redirect_uri=YOUR_REDIRECT_URI

If you’re not already logged in to your Net-Results account, you’ll be asked to do so.

You’ll be presented with the “Client Authorization” screen asking you to confirm your desire to grant permissions to the oAuth client you’ve created.

There are no specific scopes you need to be aware of. Your oAuth credentials grant full access to the API.


Click the “Authorize” button and your web browser will be redirected to the redirect_uri you provided in your HTTP request.

Your access_token and expiration timestamp will be present in the query string after redirection. You’ll need to retrieve and store these values.

Connecting to the Net-Results API

To leverage oAuth when connecting to the Net-Results API, append your client ID, client secret, and access token to the query string (as GET variables) in the endpoint URL:

https://apps.net-results.com/api/v2/rpc/server.php?Controller=WHATEVER_CONTROLLER_YOUR_CALLING&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&access_token=YOUR_ACCESS_TOKEN

Refer to the API documentation to see how to structure the JSON object you’ll pass to this endpoint to make successful requests.

Connecting a Net-Results App

If you’re connecting a Net-Results App (like our Shopify App), you’ll copy and paste the Client ID and Client Secret as instructed and we’ll take care of the rest! Just follow the instructions in the app you’re connecting.

If you need hand, don’t hesitate to reach out to our Customer Success team!

Updated on April 21, 2020

Was this article helpful?

Related Articles