Skip to main content

Does thinkwise support this? I'm trying to integrate with a Brazilian bank. The token is to be fetched using client_credentials..  I don't see this option in the TW Oauth connector. 

Also it requires a client certifcate and key.. I see an option to upload a crt file. .but the key not.. only a password. 

 



URL_OAUTH="https://cdpj.partners.bancointer.com.br/oauth/v2/token"

D1="client_id=<clientId de sua aplicação>"
D2="client_secret=<clientSecret de sua aplicação>"
D3="scope=boleto-cobranca.read"
D4="grant_type=client_credentials"
DADOS=$D1\&$D2\&$D3\&$D4

OAUTH_TOKEN_RESPONSE=$(curl \
-X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d $DADOS \
--cert <nome arquivo certificado>.crt \
--key <nome arquivo chave privada>.key \
$URL_OAUTH)

 

Hello ​@Freddy,

The Thinkwise Platform does contain a specific OAuth connector for client credentials (the OAuth Server Login connector), but this one does not support certificates.

Web connections on the other hand do support certificates and requesting a token via OAuth client credentials is fairly straightforward (your example is basically it). In order to use your .cert and .key file in a Web Connection, you will have to merge them into a single .pfx file, which you can then use as the certificate file for your Web Connection. You can do this with tools like openssl , but Windows actually has a pretty convenient built-in tool for this as well called certutil  which has a -mergepfx  feature which seemingly does the trick. A quick Google search should show you how to do this.

I hope this helps.


Hello ​@Freddy,

The Thinkwise Platform does contain a specific OAuth connector for client credentials (the OAuth Server Login connector), but this one does not support certificates.

Web connections on the other hand do support certificates and requesting a token via OAuth client credentials is fairly straightforward (your example is basically it). In order to use your .cert and .key file in a Web Connection, you will have to merge them into a single .pfx file, which you can then use as the certificate file for your Web Connection. You can do this with tools like openssl , but Windows actually has a pretty convenient built-in tool for this as well called certutil  which has a -mergepfx  feature which seemingly does the trick. A quick Google search should show you how to do this.

I hope this helps.

I will test it next week. 


@Vincent Doppenberg it worked indeed by combining the key and cert file into a .pfx file. 

After fiddling around I got it working. I even installed latest indicium to see what was send to the API, but couldn't find anything extra. Is there something we should do? I was expecting to see the body of the request and the url with query parameters.. these did not work, only after changing the pre-processing. 

Also I found out that technical DTTP DATE has 00:00:00 appended.. and how is the format determined?  I was expecting the DB format..  where does it retrieve the date format from?

 

 

the from and to date that I give in a task have the following settings:

 


The web connection debug data should be available in the "Process action completed" event.
See the screenshot:
 

The response is not logged here. The reason for that, is that in almost all cases that is already attached to a variable and therefor already shown.

At this time it is not implemented for the body type "Multipart form".
It will show the headers, url and other information - but it won't show the body.
The technical reason for this, is that a lot of the magic for this type happens in the component we use for this.

For all other types, everything is shown, including the body.

 

About your second question regarding the date data type. While in SQL you had Date/DateTime/DateTime2 for a long time - our backend technology (C#) didn’t have a “Date” Only type. So internally for our backend it was represented by a datetime type which contained an empty time part. So, what you see in the debugger is just the default presentation of a datetime from the .NET/C# language.

 

 


@Dick van den Brink thanks for the reply.  I'm using the indicium container 2024.3.14, but really don't see the debug data. 

  • process action completed : call to get bank transactions.

 


Hi Freddy,

That is weird, it should work.

Can you try it from an incognito window (or clear your browser cache?) - maybe it is due to the browser caching the JavaScript.


Strange, even when clearing browser cache it doesn't show..   but in incognito .. it does.  

 


Reply