Skip to main content
Participant
August 29, 2018
Question

API Error in R

  • August 29, 2018
  • 1 reply
  • 533 views

Hi! I got the API credentials and the authorization part worked in R. However when I ran the following code, I got the following error message:

monthlyStats = QueueOvertime(rsid,

                             date.from = StartDate,

                             date.to = EndDate,

                             metrics = c("visits","pageviews","bouncerate"),

                             segment.id = "XXXXX",

                             date.granularity = "day")

Error message:

Error in ApiRequest(body = report.description, func.name = "Report.Validate") :

  ERROR: Bad Request  -  You do not have privileges to perform this operation.

The admin got back to me and said they already gave us the full API access to the report suite I'm using. Has anyone experienced this problem before? How did you solve this? I googled solutions but didn't find a definite answer. Thank you!

This topic has been closed for replies.

1 reply

Participant
August 30, 2018

I asked Gigazelle and he pinpointed the problem. It worked! So basically the admin needs to check 2 things under User Management. There are two places you need to have permissions:

  1. Report Suite Tools > Customize > Ensure each of the Web Services check boxes are checked
  2. Analytics Tools > Customize > Tools > Web Service Access checkbox is checked (there are multiple web services checkboxes in here, ensure the one under tools is checked).

Double check with your admin to ensure those are checked. Beyond that, customer care is likely going to be the next best point of contact. If you can give them an example request that's working, and another example of what's not working, they should be able to pinpoint the issue fairly easily.