In this post I will explain how to get the API endpoint for a Dynamics CRM environment.
1. Go to https://make.powerapps.com/
2. Choose the environment
3. Click on the settings icon next to the environment name
4. Click on 'Developer Resources'
Note:- The endpoint might work without the .api in the URL. But if you are specifying the scope using the URL when calling the endpoint from postman using Service Principal / App registration, you might need to use .api in the url.
you should use the below for the scope in postman, in case it is not working for you.
https://xxxxxxxxxx.api.crm6.dynamics.com/api/data/v9.2/.default
Feel free to point out if anything is wrong/missing in this post.