This is a guest post written by Tamil Arasu, Automation Anywhere MVP and RPA Developer with Fugro Netherlands.
In this article, you will learn how to use OAuth2.0 in the REST API package with the Bearer token.
Modern authentication is used to integrate/communicate between applications. As the Automation Success Platform does not currently support OAuth2.0 on the REST API package directly, let’s see how we can connect or integrate the application via OAuth2.0 using A360. By following this method, you can establish communication between various applications via OAuth2.0 using A360 REST API Package.
OAuth 2.0 is the industry-standard protocol for authorization. OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications, desktop applications, mobile phones, and living room devices.
OAuth 2.0 Bearer Token Usage
A Bearer Token is an opaque string, not intended to have any meaning to clients using it. Some servers will issue tokens that are a short string of hexadecimal characters, while others may use structured tokens such as JSON Web Tokens.
Let's explore the steps in the Automation Success Platform -
Follow the below steps to generate the token -
Mandatory Parameter Values are:
• Client ID
• Client Secret
• Grant Type
• Client Authentication
Note: Scope and Client Authentication may vary according to the application
Note: Depending on the application, the parameters may differ. However, most of the settings are used in the Enterprise Applications such as Microsoft Dynamics, IFS, Oracle ERP, and other ERP Tools etc.
Below screenshot shows the Bot Editor view.
The token will appear in the message box. Once you get the token, store this value into a variable. You will be able to pass the token value as shown below. To use bearer token, you can add the Header Prefix bearer keyword to authorize an application.
Following the above steps, you can use GET, POST,PUT, PATCH, DELETE actions and communicate between applications.
Is it possible to send attachments? Yes, it’s possible. To do that, choose the content type as multipart/form-data, and attach the file path.
In the screen below, custom headers may vary according to the application.
To give an example, for connecting CRM Dynamics, we can use it as shown below.
We will receive the response message which contains the access token. Once we get the token, use the token in custom header section and retrieve the data from the CRM.
OAuth 2.0 authentication is the first step needed to work with a lot of Enterprise applications and this solution will help you meet the authentication requirements needed to login and interact with these applications.
If you have an idea for a blog post or tutorial that would benefit the Pathfinder Community reach out to email@example.com.