If you have curl installed, you can use the following command to get a token. Replace the following:
- BASE_URL is your magento 2 domain, like https://domain.com
- ADMIN_NAME is the username that you use to login to the admin backend
- ADMIN_PASSWORD is the password that you to login to the admin backend
curl -X POST "BASE_URL/index.php/rest/V1/integration/admin/token" -H "Content-Type:application/json" -d '{"username": "ADMIN_NAME", "password": "ADMIN_PASSWORD"}'
It will return a token. Copy that token and try your get again. To do it with curl, you can try the following. I added searchCriteria to only get the first 10 records. You have to escape [] with \ in curl. Also, make sure you replace BASE_URL and TOKEN:
curl -X GET "BASE_URL/index.php/rest/V1/orders/?searchCriteria\[currentPage\]=1&searchCriteria\[pageSize\]=10" -H "Content-Type:application/json" -H "Authorization: Bearer TOKEN"