@gplcart opened this Issue on November 17th 2018

Hello
Trying to create a new website using API.
The GET request looks like so:

GET /analytics/index.php HTTP/1.0
Host: my-site.com

module=API&method=SitesManager.addSite&format=json&siteName=teste&urls%5B0%5D=http%3A%2F%2Ftest.com&token_auth=MY_KEY

The query returns HTML code of login form. I also tried to use other methods from https://developer.matomo.org/api-reference/reporting-api#SitesManager with the same result

Seems like a permission problem.

How to solve this?

@gplcart commented on November 17th 2018

Forgot to mention that all requests come from localhost

@gplcart commented on November 17th 2018

Hm.. got it working by using file_get_contents() instead of CURL. Weird...

This Issue was closed on November 17th 2018
Powered by GitHub Issue Mirror