Jump to content
We have recently updated our Privacy Statement, available here ×

Can anyone share the sample code for oauth2 configuration to invoke the rest api in tibco BW 6


Nilam -

Recommended Posts

Hi,

I am trying to consume the rest API to generate the oauth 2 token in tibco bw 6.4.2. However, I did not find any specific option to configure oauth2 in tibco bw 6 as like bw 5.

Anyone has any input in this would be appreciated.

Thanks,

Nilam

Link to comment
Share on other sites

  • 1 year later...

Did you already try the following

To get OAuth 2.0 access token, the customer needs to get the URL for the OAuth Token server and the three parameters "client_id", "client_secret" and "grant_type". The customer needs to know whether the OAuth Token server requires the above parameters as a "Query" parameter or "Form" parameter.

1). If OAuth token server requires "Query" parameter:

a). Go to "Invoke REST API" activity-> "Configuration" Tab, specify OAuth Token Server URL into "Resource URI", choose Method as "POST";

b). Go to "Input Editor" tab, expand Parameters->"Query", create three parameters "client_id", "client_secret" and "grant_type" under "Query"

c). Go to "Input" tab, expand Parameters->"Query", and then specify or map values for parameters "client_id", "client_secret" and "grant_type", save the project and execute the process.

 

2). If OAuth token server requires "Form" parameter:

a). Go to "Invoke REST API" activity-> "Configuration" Tab, specify OAuth Token Server URL into "Resource URI", choose Method as "POST";

b). Go to "Input Editor" tab, expand Parameters->"Body"->"Form", create three parameters "client_id", "client_secret" and "grant_type" under "Form"

c). Go to "Input" tab, expand Parameters->"Body"->"Form", and then specify or map values for parameters "client_id", "client_secret" and "grant_type", save the project and execute the process.

Taken fromhttps://support.tibco.com/s/article/How-to-configure-Invoke-REST-API-activity-to-get-OAuth-2-0-access-token

Link to comment
Share on other sites

×
×
  • Create New...