How to skip the log in screen when getting a SAML Assertion from a SAML client?

I have configured Keycloak SSO, and can get a SAML assertion by logging in the URL: http://localhost:8080/realms/myrealm/protocol/saml/clients/test

How do I get the SAML Assertion without opening the URL in a browser (basically skipping the log-in screen). Is there any API to send basic credentials/user OAuth token and get the SAML Assertion from the SAML protocol client? Or is there any way to configure a service account or similar to exchange its client credentials token for another client’s SAML assertion?