Dynamic authentication using curl

Hi Team,

I have executed below code successfully. This works fine for hardcode values. However In real time I need to get the username and password from user to authenticate.

Could you please provide the solution to make it dynamic?

Please find the code below.

curl -v -X POST https://dev-70709827.okta.com/api/v1/authn
-H “Accept: application/json”
-H “Content-Type: application/json”
-d ‘{
“username”: “xxx”,
“password”: “xxx123”,
“options”: {
“multiOptionalFactorEnroll”: false,
“warnBeforePasswordExpired”: false