Using with Make.com

Requesting a token

Make.com strangely does not support OAuth2 Client Credentials flow out of the box. The first step is to generate a session token from your Trelica API credentials.

Search for, and add the HTTP module:

Choose Make a Basic Auth request:

Click to Add your credentials:

The Username is your Client ID, and the Password is your Client Secret:

Click Create.

  1. Set the URL to https://app.trelica.com/connect/token
    If you're on our EU instance, then use https://eu.trelica.com as a host in all these instructions.
  2. Choose POST for the Method.
  3. Body type should be Application/x-www/form-urlencoded
  4. Add a Field called grant_type with the value client_credentials
  5. Set Parse response to Yes.

Click OK.

Now click Run once to run your request to test it out.

It should come back green - click the 1 to view the response. You should see the access_token in the response.

Storing the access token

We now want to put the access token in a variable for re-use.

Select the Set variable tool:

Link your first HTTP action to the Set variable tool, and then click on it to specify what you want to call the variable and the value you want to set:

Variable name token
Variable lifetime One execution
Variable valueC

Click in the field and pick Data > access_token

Making the API call

Now add a new HTTP module, and link it to the Set variable step.

This time choose Make a request (i.e. not Basic Auth).

  1. Set the URL to https://app.trelica.com/api/apps/v1 (or whichever endpoint you want to call).
  2. Select the appropriate Method, e.g. for this endpoint GET.
  3. Add a Header called Authorization. The value must be the text Bearer, followed by a space, and then select the token variable you created earlier.
  4. Set Parse response to Yes.

Click OK, and now re-run the whole workflow.

You should see the application list in the Output:

 

 

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.