I am starting with salesforce development but while connecting my org to salesforce cli, i am getting an error like - The REST API is not enabled for this Organization. Please find the screenshots below -
And also in browser it is redirecting me to this url - http://localhost:1717/OauthRedirect?code=aPrxGfV7WpWWFnHr1BftlZq.nONCzwSN.M7wIvI5VhKlMmdWCqzFghvEPSX729wC0OnXDqB6QA%3D%3D&state=e9d1b63ebaf1 please refer the below image -
Any solution? How to fix it?
You have probably signed up, accidentally, for a trial of Professional Edition, which does not come with API access. To try out development, sign up for a Developer Edition at developer.salesforce.com, which does come with API access.
If the org you are using is your (paid) business org, you should still get a Developer Edition to practice in, and be aware of the limitations of development on Professional Edition.