Api token authorization openid connect

How can I retrieve the authorization code without redirecting the user to obtain it?