Setting up Coupa OAuth2.0 client and configuring a connection on webMethods.IO Integration
This article shows the step-by-step process of setup an OAuth 2.0 client in the Coupa backend and configuring a connection on webMethods.IO Integration.
- The user needs to have working Coupa account details.
- The user must have a working webMethods.IO Integration tenant
- Setting up OAuth 2.0 client on the Coupa backend
- Generating Access token using the REST client
- Configuring a Coupa connection on webMethods.IO Integration tenant
- Login to your Coupa instance. Click on Setup.
- Search for OAuth2 in the Use the instant filter search bar. Click on OAuth2/OpenID Connect Clients under Integration
- To create a new client, click on Create as shown in the image below.
- Choose ‘Client Credentials’ as the Grant Type from the dropdown. Fill in the values for the remaining fields : Login, Contact FirstName, Contact LastName and Contact Email.
Select the required scopes and click on Save.
- The Oauth client is now created as below. Copy the Identifier and client secret (Secret) which is required for the access token generation.
- Create a POST request on Postman or any other REST client to generate the token with the below parameters
URL : https://<your_coupa_instance>.coupacloud.com/oauth2/token
BODY params : x-www-form-urlencoded
client id : Identifier from Step 5
client secret: secret from Step 5
scope : scopes selected in Step 4 (separated by single space)
grant_type : client_credentials
Click Send on the HTTP POST request formed
- Access token is generated as shown below.
Note : Access token lasts for 24 hours, so Coupa’s recommendation is to renew the token every 20 hours. If the existing token expires, a new token call must be made.
Configure a connection in webMethods.IO tenant
- Login to your webMethods.IO Integration tenant with the username and password.
Create a project. Create a new workflow/flowservice.
Select the Coupa connector from the Connectors panel.
- Click on Settings icon. Select version 30 (OAuth2.0 functionality is available from Version 30 onwards only) Click on the + button to add custom action.
- Select OAuth V2.0 from the Select Authentication Type dropdown. Click on the ‘+’ button to Authorize Coupa and Add account.
- Enter the values for fields
- Client ID, Client Secret (from step 5)
- Access token ( from Step 7)
- Refresh URL : https://<your_instance_address>/oauth2/token
- Grant_type : client_credentials
- Server URL : https://<your_instance>.com
- Scope : Scopes used in Step 6.
Click on Add after all the above fields are entered.
12.Account is now saved successfully and can be used to create and execute custom actions available in CoupaV30 connector.