Upload certificate PFX

My application makes a POST in an API, but it needs the PFX file of the digital certificate to be uploaded for authentication, in POSTMAN I managed to do it, because there I can upload the file. But I can’t find the way to do the same in the API Connector, can anyone help? I’ve wasted too much time on this! I beg! ROFL

PS.: Documentation link, if necessary. How to authenticate in the API - Integra Contador (serpro.gov.br)

PS_1: It’s in Brazilian Portuguese. Thank you very much! :grinning:

[image]

maybe change the body type from JSON to Form-Data and tick ‘Send file’ checkbox on the parameter key value pair?

Error, it doesn’t recognize that there is a PFX there. But still, what do I put under “Key”? Value is the PFX file.

from the documentation it looks like the key would be “cert-type” - specify the file type “P12” or “PFX”

then another key “cert” which will be your file.

Unfortunately, same error… I also tried putting the link to the file upload. :frowning:

what’s the error?

There was a problem setting up your call.

Raw response for the API
Status code 400
{ “timestamp”: “2022-11-20 00:15:31”, “status”:400, “error”: “Bad Request”, “message”: “Could not identify a valid digital certificate”, “details”:, “trackerId”: “2t1V6OBp”, “path”:“/authenticate”}

and you have your headers in there specifically content-type?

Yes, perfectly.

ok, let’s change it back to json and for the cert key use the file url with the pw

example:
https://somedomain.com/mycert.pfx:thesslpassword

And the value on the key?

yea the value for cert will be certificate_path:certificatepassword

so the certificate path would maybe be a url for the file and then :TheFilesPassword

certificate_path = https://website.com.br/certificate.pfx
Password = 1234

Key = (?)
Value = https://website.com.br/certificate.pfx:1234 (?)

use “cert” for the key

Same error… :frowning:

let’s go on a limb and try ticking queryst. on each and retry

Nothing… Limbo LOL

haha. tick grant type as well.

Same error.

OK… next.

Go BACK to Form-Data

Setup your keys again

then for your cert keep private ticked and nothing else. make the value mycert_path:mypassword