Insufficient privilege usually occurs because of one of two reasons, 

  1. The API key/Access Token is invalid/expired.

  2. You are accessing the test endpoint of APIs using live credentials i.e. key_live_***** and secret_live_****** and vice versa.

 Because of which the API does not work. The Error would look like this: 

How to resolve it? 

If you wish to test the API, you need to get the Access Token using the Test API keys


Please note that you can only use the Testing-Data provided on the API page with your Test API key. Live credentials will not work. 

Test Endpoint

https://test-api.sandbox.co.in/ 


However, if you wish to use live credentials, then you need to get the Access Token using the Live API keys. 

How to Refresh Access Token? 

If you are still receiving this error, then you need to either generate a new Access token or authorize it again. Access tokens are valid for 24 hours from the time of creation. To authorize the key again, click here. 

Note that you are required to input the old access token in both highlighted fields. 

And that's all! Hope that helped!