Common Problems
This is a list of common errors and problems that users see when using the SolarFarmer web API, and solutions.
It is early days for the life of the web API so check back often to see if additional problems and solutions have been posted.
Check existing solutions first
You may not be alone in having the issue you have. Someone else may have seen the same issue and there may already be a solution. So check these areas first before submitting a support query:
- Check this page first for any existing solutions.
- Search this website for keywords in any errors you are seeing, you may find help here first.
Get in touch
If you cannot find a solution and are stuck, please get in touch:
- Email solarfarmer@dnv.com with a thorough description of the problem and ideally ways of easily reproducing it.
- Internal DNV employees can use the SolarFarmer Users Teams channel too.
Common Errors
Error: "Unauthenticated" (Error status code: 401)
This occurs when there is a problem with the API access token that you are using to access the API.
- Are you using the correct API access token for the API server that you are using?
- Most users use the production server (https://solarfarmer.dnv.com/api) but there are some other servers used for internal development for DNV employees. If using these, a different API access token is required. Go to the web-page of the server you are using, expand the 'Your API access token' panel on the home page, copy to the clipboard and use that.
- Has your API access token expired?
- An easy way to check is to log in to the Web Service website (https://solarfarmer.dnv.com/). The expiry date will be shown there. If it has expired you can regenerate it.
- Has your API access token string been corrupted?
- If you're using the token string directly in a python script, could it have got corrupted somehow? Worth copying it fresh from the API home page and trying again.
If, after checking the above, you still get the 'Unauthenticated' error and you believe it should be working, email solarfarmer@dnv.com and one of our support team can try and understand why and help you get back up and running.
Error: "RBAC: access denied" (Error status code: 403)
This generally occurs when the API token being used is incorrectly specified.
- Have you specified your API token correctly in your scripts?
- It's important when using your API token in the Authentication header that it is specified with the Bearer prefix. See the example in the About Endpoint Tutorial.
- If you are retrieving it from an environment variable, make sure the environment variable is set correctly and your script is retrieving it successfully.
- If it's happening when you're trying the Swagger docs (in https://solarfarmer.dnv.com/docs) then please read Try the endpoints on the API website, taking note of how to authorize the calls.