Setting up Coupa OAuth2.0 client and configuring a connection on webMethods.io Integration
Tags: webmethods, integration, tutorial
Published: 2022-12-14 13:33:46

---
title: Setting up Coupa OAuth2.0 client and configuring a connection on webMethods.io Integration
published: true
date: 2022-10-12 12:04:43 UTC
tags: webmethods, integration, tutorial
canonical_url: https://tech.forums.softwareag.com/t/setting-up-coupa-oauth2-0-client-and-configuring-a-connection-on-webmethods-io-integration/264653
---

**Setting up Coupa OAuth2.0 client and configuring a connection on [webMethods.io](http://webMethods.io) Integration**.

**Summary**

This article shows the step by step process to setup an OAuth 2.0 client in the Coupa backend and configuring a connection on [webMethods.io](http://webMethods.io) Integration.

**Prerequisites**

- The user needs to have a working Coupa account details.
- The user must have a working [webMethods.io](http://webMethods.io) Integration tenant

**Contents**

1. Setting up OAuth 2.0 client on the Coupa backend
2. Generating Access token using the REST client
3. Configuring a Coupa connection on [webMethods.io](http://webMethods.io) Integration tenant

Steps

**Setting up OAuth 2.0 client**
1. Login to your Coupa instance. Click on Setup.
[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/a/f/af89c9233054be1720fa60d2de3134e1a1f300b7_2_690x260.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/a/f/af89c9233054be1720fa60d2de3134e1a1f300b7.png "image")
1. Search for OAuth2 in the Use the instant filter search bar. Click on OAuth2/OpenID Connect Clients under Integration
[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/2/b/2b82eb9bc5295861a69421c324465d01d745b6ea_2_690x232.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/2/b/2b82eb9bc5295861a69421c324465d01d745b6ea.png "image")
1. To create a new client, click on Create as shown in the image below.
[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/1/c/1cf2538479ded9c44db87d6548a28ae642c89e3a_2_690x197.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/1/c/1cf2538479ded9c44db87d6548a28ae642c89e3a.png "image")
1. 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.
[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/4/1/418cf2b94e996e3e694264ac384274bafbe13fdd_2_690x428.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/4/1/418cf2b94e996e3e694264ac384274bafbe13fdd.png "image")
1. The Oauth client is now created as below. Copy the Identifier and client secret (Secret) which is required for the access token generation.
[![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/6/6/66a9bbb212e0c8fe4867bcd190af27196a128dd6.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/6/6/66a9bbb212e0c8fe4867bcd190af27196a128dd6.png "image")

**Generating Access token**

1. 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
[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/b/2/b2f4e7b3a7a0166c52ffb9f2ee7b7dea2197aa62_2_690x266.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/b/2/b2f4e7b3a7a0166c52ffb9f2ee7b7dea2197aa62.png "image")
1. 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.
[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/a/d/ad8776321888ab55bcae3e2ddf8ddb036b78afbb_2_690x157.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/a/d/ad8776321888ab55bcae3e2ddf8ddb036b78afbb.png "image")

**Configure a connection in [webMethods.io](http://webMethods.io) tenant**

1. Login to your [webMethods.io](http://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.
[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/3/c/3c4c7c133872591064960726f7962dc1974c8bdb_2_690x196.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/c/3c4c7c133872591064960726f7962dc1974c8bdb.png "image")
1. 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.
[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/5/a/5ae0627c973d09eeb5fdda3b9f61102377ae5c4f_2_690x484.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/5/a/5ae0627c973d09eeb5fdda3b9f61102377ae5c4f.png "image")
1. Select OAuth V2.0 from the Select Authentication Type dropdown. Click on the ‘+’ button to Authorize Coupa and Add account.
[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/3/3/3351af56092ce29628718364dcafa6bbf55b84cc_2_690x375.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/3/3351af56092ce29628718364dcafa6bbf55b84cc.png "image")
1. 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.
[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/3/b/3b7f6dbbef559022a42f53e2a2e9d3f7b246ef1f_2_542x500.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/b/3b7f6dbbef559022a42f53e2a2e9d3f7b246ef1f.png "image")
12.Account is now saved successfully and can be used to create and execute custom actions available in CoupaV30 connector
[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/2/7/2725cc275852aaae51fc5801271a3107a97fa7af_2_426x500.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/2/7/2725cc275852aaae51fc5801271a3107a97fa7af.png "image")

[Read full topic](https://tech.forums.softwareag.com/t/setting-up-coupa-oauth2-0-client-and-configuring-a-connection-on-webmethods-io-integration/264653)