If you get the API Error: You do not have permissions to use the API. The first thing to check is that you have a valid API token in the project your calling.
You can also check the user rights in the project to make sure that the following is selected. There is no additional back-end API permission needed.
However, the Error You do not have permissions to use the API can be caused by other issues. Here is a discussion about some of these other issues.