API connections are managed through Trelica Apps.
There are two sorts of app:
- an app with local access, which can only connect to your organization's data, or
- a published app which lets software developers build tools that connect to Trelica's API, which any Trelica customer can use.
Creating an API app in Trelica
Whichever route you want to go, the starting point is the same. To create your first app, go to Admin > Settings > API Access and click New:
You need to enter three basic things to create an app:
- A logo icon (ideally square - we recommend SVG or PNG). We've provided a sample logo here to get you started.
Sample App logo
- A short but clear name.
- Scopes which determine the actions you are allowed to perform when you connect using this app.
The Client ID and the Client Secret are the credentials that you will use when connecting to the Trelica API.
You must take a copy of the client secret before you close the dialog because Trelica doesn't store it, and so we can't show it again. If you forget to do this, you can always edit the app again and generate a new one.
Don't forget to Save once you've copied your credentials.
It sounds obvious, but it's easy to find yourself cutting and pasting credentials to (say) Postman, immediately trying to connect, and finding it doesn't work. The credentials aren't valid until you save the app.
Which OAuth 2.0 configuration do I need?
Client credentials
Start off using client credentials. This is the simplest way to connect to the Trelica API.
Authorization code
If you choose Authorization code flow then you will need to enter two additional pieces of information:
- A message that will get shown to users when they are asked to consent to you accessing their Trelica data on their behalf. You should use this to confirm what you will do with the Trelica data you access.
- One or more Redirect URLs. These are part of the OAuth 2.0 specification, and are URLs that Trelica is allowed to call once the user has consented to (or denied) granting access to their data. You can read more about this process on the Authorization Code flow page.
Comments
0 comments
Please sign in to leave a comment.