Authorizing Avaza APIs in Astera Centerprise

The Avaza API follows REST protocol with ‘OAuth2’ authentication. It allows you to access contacts, projects, tasks, invoices and taxes. In Astera Centerprise, you can configure an Avaza API through a swagger definition using the Import API option in REST API Browser.

Let’s go over how we can authenticate an Avaza API in Astera Centerprise.

1. Create an integration project by going to Project > New > Integration Project.

1-creating-an-integration-project

2. To import Avaza API in your Centerprise client, click on the following icon.

2-Import-Api

3. An Import API window will open. Here you will need to select your relevant import source. In this case, we will import using the Json/Yml Url source.

Base URL: https://api.avaza.com/swagger/docs/v1

3-File-Path

You will see that all the APIs present on Avaza’s URL have been populated in the REST API Browser (Beta).

4-Avaza-API-Documentation

4. Now, you need to authenticate the Avaza APIs to be able to use them in your dataflow. Without authentication, you will get an error. To authenticate an API, go to the Project Explorer and double click on the API’s .sact file under the Shared Connection node.

5-Project-Explorer

The Avaza .sact file will open on the designer. Now, right-click the shared action file’s header and select Properties.

6-Properties

5. This will open the REST API Connection window where you can configure settings to authenticate Avaza API.

07-RESTAPIConnection

Avaza uses ‘OAuth 2’ authentication. In the ‘OAuth 2Security Type, select one from the following Grant Type options:

  1. Authorization Code
  2. Implicit

In this case, we will be using the ‘Authorization Code’.

Note: Login to your Avaza account and go to Settings > Developer Apps > Add OAuth App to generate the ClientID and Client Secret.

Auth Url: https://any.avaza.com/oauth2/authorize

Access Token Url: https://any.avaza.com/oauth2/token

8-OAuth2

6. Now, click Request token to generate an access token and refresh token for Avaza.

Note: As you click on Request Token, Avaza’s authorization app will open where you will be required to provide your credentials to be able to generate access token and refresh token to access Avaza.

9-Access-Token-Refresh-Token

7. After authentication, save the shared action file, and you are ready to use Avaza APIs in Centerprise.

This concludes authenticating the Avaza APIs in Astera Centerprise.