Get auth token to access HTTPS api using username and password

With service user I am able to work on apis by using https://hostname/auth/realms/master/protocol/openid-connect/token.

I want to get token using username and password instead of client secret key. Could you please suggest any way to do it?