How to Add Managed OAuth 2.0 Apps for Trustpilot API and Refresh Tokens Every 4 Days?

This topic was automatically generated from Slack. You can find the original thread here.

I’m trying to set up a workflow step that sends an API call to Trustpilot’s API.

I don’t see Trustpilot in the list of apps that are preconfigured, so is there a way to add managed OAuth 2.0 apps easily?

The main issue I need to be managed is the token refresh since they expire every 4 days…

Hi Matthew, great question. We don’t have self-served integrations yet but that’s something in the works.

In the meantime, you can request for a new integration to be added here:

We’re pretty quick at fulfilling these. And we’ll handle the OAuth heartbeat config, etc.

Are there specific scopes that you’ll need included?

Oh dear, so that rules out Pipedream for this project entirely then?

Oh sorry, you’re saying you can add it

Sorry, maybe I misunderstood. You have your own OAuth app registered with Trustpilot?

Yes that form will kick off the process of us adding a Pipedream managed OAuth app registered with Trustpilot that you can use in your Pipedream workflows

Here are the docs

https://developers.trustpilot.com/

Auth for the calls I want to make is done via OAuth. I’ve got an application I generated in their system which has provided me with a key and secret.

But the bit that needs the management is obtaining the access token, and then getting new ones when that runs out via their refresh token endpoints.

https://developers.trustpilot.com/authentication

This is the API call I want to make:
https://developers.trustpilot.com/invitation-api#create-invitation(s)

Just writing this workflow for a client who will then go onto a paying account, as they’ll be doing a few thousand invocations a month

Great, yes we can handle that. The refreshing of tokens would be abstracted and you’d just need to authorize your client’s account to Pipedream to use it in workflows.

Once that request is submitted, our apps team will scaffold the integration and it’ll be available to use with Node.js & Python code steps in workflows. Then later pre-built actions and triggers can be built for that integration

So would you guys use the “Grant Type: Authorization Code” method, or would there be the option to use “Grant Type: Client Credentials”?

The latter doesn’t require an authorisation step with Trustpilot, instead you just get the access token with the API key and secret, although I’m not really precious about which method is used

It depends on which is the easiest end use. We default to normal OAuth since it’s the easiest experience to get started, without creating API keys manually, pasting them, etc.

Looking at the TP info, seems that every grant type will require at least an API Key to be provided, which has to be generated manually within the TP admin area

You got any any idea roughly how long it might take to get the integration up and running? My client, surprise surprise, is in a terrible hurry :laughing:

I definitely hear that. The rest of the team is on PST, so they’ll be in soon. I’ll follow up with them to pick the best auth route for this case. It shouldn’t take very long at all.

Some integrations we set up in less than 5 minutes. Our system doesn’t require any code to add new ones.

Yeah that’s what I thought, and actually that’s why I thought I’d be able to set it up on my end. Cool that you can do it so quickly though. I’m hoping to have the workflow live next week.

Shall I fill out that form now then?

Yes please, that’ll kick off our process and notify the right folks

And I’ll swing back here when it’s live