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. 


Reply