Cool I can update that — if you manually update the code to use that endpoint, does it work?
Yeah was just trying that… and no… lol
Getting a 404 response for some reason
FYI this one below isn’t going to work as it literally lists every business unit on Trustpilot’s server, not just ones owned by that api key’s account!
Alternatively, get a list of the business units using the Public API. You’ll need your API key (and in my tests, the api key won’t work with a URL parameter and has to be supplied as a header) - API call and info on api key based auth
I updated the test URL to:
https://invitations-api.trustpilot.com/v1/private/business-units/${this.trustpilot.$auth.business_unit_id}/templates
If you re-authenticate you should bet prompted to add your business unit ID
Adding the helper copy now
Ah. that’s why I got the 404, I didn’t notice the hostname changes between the different categories of API… weird design choice
I’ll delete the app and start again
To check it all
I would delete this “If prompted for the Redirect URI, copy and paste this URI: https://api.pipedream.com/connect/oauth/oa_a49ilX/callback”
You don’t need to enter that anywhere? Just the host in the approved hosts?
Correct
Pipedream is sending the full redirect URI with the authentication request, Trustpilot just wants to know the hostname
Yea, most other apps require you configure the full redirect URI in the app settings as well, but noted they don’t need it
OK. Yes it seems to work now with the updated default test API call
Is it possible to make a list of pre-made API call templates in the app?
I believe this is what you might be looking for: Sharing code across workflows
You can publish your Node.js code steps using that API as a private action and reuse it as a template for other workflows.
I reckon these two would be good choices as a first step:
• Invitation API - Trustpilot API Documentation
• Invitation API - Trustpilot API Documentation
Oh okay