Using with Make.com

Requesting a token

Make.com doesn't support OAuth2 Client Credentials flow out of the box. The first step is to generate a session token from your 1Password SaaS Manager API credentials.

  1. Create a new Make scenario, then search for and add the HTTP module.
  2. Choose the Make a Basic Auth request action.
  3. Click to Add your credentials. The Username is your Client ID, and the Password is your Client Secret.
  4. Click Create.
  5. 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.
  6. Choose POST for the Method.
  7. Body type should be Application/x-www/form-urlencoded
  8. Add a Field called grant_type with the value client_credentials
  9. Set Parse response to Yes.
  10. Click OK.

Now click Run once to run your request to test it out. It should display a green checkmark. 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.

  1. Click the Tool button in the bottom toolbar, then select the Set variable tool.
  2. 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 nametoken
Variable lifetimeOne execution
Variable value

Click in the field and pick Data > access_token

Making the API call

  1. Add a new HTTP module, and link it to the Set variable step.
  2. Choose Make a request (i.e. not Basic Auth).
  3. Set the URL to https://app.trelica.com/api/apps/v1 (or whichever endpoint you want to call).
  4. Select the appropriate Method, e.g. for this endpoint GET.
  5. 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.
  6. Set Parse response to Yes.
  7. 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.