Step 1: Test Authentication

Once you have the username and password for your NAPI account, you can use the Test Authentication endpoint to check that they're working. The only thing you need to provide in this request is an authorization header, at shown below. To generate the "ACCESS_TOKEN" portion of the header, combine your username and password into username:password and run the resulting string through Base64 encryption. Alternatively, you can use a program such as SOAPUI or Postman to construct the authorization header for you.

Request

GET <<endpoint>>/connection/v1/testauthentication
Authorization: Basic ACCESS_TOKEN

Response

Hello JoeNapoli_API_Demo

You should receive a response containing your username, as shown above. The most common reasons for an error response are:

  • The authorization header isn't set properly. It should be a Base64 - encrypted Basic Authentication header.
  • The spelling is incorrect.
  • The wrong credentials were used.

Ensure that you are setting the authorization header correctly, using the right username/password without any typos.


Did this page help you?