Tray Embedded / Core Topics / Custom Services
Custom Services
Overview
Creating a generic service authentication is the most straightforward way to use a service that is not included in our list of connectors. Please see our Authenticating Connectors page for details on creating one.
You cannot create a generic service auth for complex and Oauth-based authentications. In such cases, we recommend creating a new service.
When you want to use a service which is not available in the list of pre-built Tray connectors, you will have to build a custom service.
Creating a service
IMPORTANT!: For Tray Embedded, Custom services must be created in the organization workspace of the owner.
Refer to the Platform page here.
Go to the Services tab in your Organization workspace (you must be the owner of the embedded account) and create a custom service:
Your custom services are available organization-wide. This means other users can also use this service for creating authentications. This does not mean they will be able to see and edit the custom service in their services section.
Once you have built a custom service, you can then use the Http Client to make all the calls you need to the service.
Reading API documentation
In order to work out how to authenticate with your service and how to make specific calls to e.g. a '/customers' or a '/accounts' enpdoint you will need to read the API documentation published for that service.
Please note that there is no uniform standardization of language or terminology across all potential services.
If you are new to reading API documentation, we highly recommend you check out our 'Reading API docs' Academy course
All service API documentation is written in a style specific to that company. When used in conjunction with our own, the terminology can get confusing.
For example, when Tray.io refers to a 'parameter' within the context of a custom service, it refers to it in the form of a 'query parameter'. Another service may use the same term to refer to a 'header parameter' or item in the 'request body'.
Another example worthy of note is that a service within Tray.io usually refers to a service connector, such as the AWS connectors.
However, a lot of documentation will have a general commonality and therefore should not be too difficult to comprehend.
Remember that you can also check out service forums and examples of what users before you tried to do online.
Authentication methods
There are two main methods of authenticating with the HTTP client connector: OAuth2, Token.
IMPORTANT!: While it is possible to also authenticate with OAuth2 Password grant flow and OAuth1, we do not recommend these unless absolutely necessary due to the security risks they pose.
You can go through the pages in this section to find a basic setup guide for each method.
Every page contains a detailed walk-through using specific examples to demonstrate the full process.
Notes on Importing
The usual import process currently does not support a project or a solution which has a custom service.
For Tray embedded users, once you create a solution that uses a custom service, please read the page on Importing solutions with a custom service.
For Tray platform users, once you create a workflow/project that uses a Custom Service, please read these sections on Importing Project with a Custom Service, Importing Workflow with a Custom Service.