@Lars Fosdal You're right, sorry, I'll improve
This is a government service, it works in a separate network, without external access.
I don't use Indy, I use REST Client Library and components TRESTClient, TRESTRequest, TRESTResponse, TRESTResponseDataSetAdapter, TOAuth2Autenticator
grant_type is set to client_credentials and I have to use a certificate.
I can't use REST_Debugger because it doesn't deal with client_credentials.
I get an error when connecting
ERESTException
REST request failed: Error sending data: (12175)
which means a security error has occurred
During the connection, the RESTClient.OnNeedClientCertificate event in which you specify the certificate is not executed.
I do not know why.