
chandraz.35928 (Customer) asked a question.
How to get access token with curl command from cli. I am able to get session token. But I want curl commands to get access token and login into application with access token. I am using following command to get access token
curl -v -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d '{
"username": "mailid",
"password": "***",
"options": {
"multiOptionalFactorEnroll": false,
"warnBeforePasswordExpired": false
}

Hello @chandraz.35928 (Customer) Thank you for reacting out to our Community!
Please see this article that should resolve you issue:
https://stackoverflow.com/questions/36016388/how-can-i-log-into-an-okta-enabled-site-using-curl
Additionally if you need further assistance we recommend to leverage the Okta Developer forums for this type of questions and take advantage of their expertise.
https://devforum.okta.com/
Community members help others by clicking Like or Select as Best on responses. Try it today.