Element Builder provides an option to set the resource type in the resource configurations. The resource type is used to indicate when the resource should be triggered. Most standard resources are set to the resource type API. These API resources are trigged when an explicit request is made to the endpoint through Cloud Elements. Some other commonly used resource types are ON PROVISION, PROVISION AUTH VALIDATION, and ON REFRESH.
The ON PROVISION resource type is called when an element instance is being authenticated. It can be used to extract information during the authentication process that can then be added to the element configuration. This type of resource does not get called when refreshing the instance authentication token. Additionally, it can be chained to occur after a PROVISION AUTH VALIDATION resource.
Provision Auth Validation
The PROVISION AUTH VALIDATION resource is called when an element instance is being authenticated as well as when the authentication is being refreshed. For example, if you have an "expires_in" configuration in your element, set to 3600, it will call the PROVISION AUTH VALIDATION resource every hour. Alternatively, for elements that use OAuth but we still need to validate whether the access token works, we will use this resource for basic validation to see if we can make API calls. Finally, for elements that support basic or custom authentication, we use PROVISION AUTH VALIDATION as the mechanism to retrieve the "access_token" or equivalent. If you need to make an additional call following that, then you can chain this call with an ON PROVISION call.
The ON REFRESH resource type is called after the element makes an OAuth 2.0 token refresh request. This type can be used in place of PROVISION AUTH VALIDATION if you are using an element that supports OAuth 2.0 and do not want to use the same PROVISION AUTH VALIDATION call to handle token validation and refresh.
API Element Request
The API element requests can be created in the extended elements only. API element request can add resource calls as per the provider requirement. The resource calls made in the request field from the vendor site are editable to match how it appears in the provider platform.