Embedding Dashboard Widget: Auth Token

Danger: Newbie here :slightly_smiling_face:

I’m trying to embed a Matomo dashboard into my app server page.

I have this user with an API auth token, which I have included in the URL:

http://abc.def.com/index.php?module=Widgetize&action=iframe&moduleToWidgetize=Dashboard&actionToWidgetize=index&idSite=3&period=week&date=yesterday&token_auth=xxxxxxxxxxxx"

However, when I load the page I get this error:
Error: You can’t access this resource as it requires ‘view’ access for the website id = 3.

It seems that the user which I had created is not being used. It keeps complaining that my user cannot access website id=3, but matomo_site has only ONE record (idsite=1)!! I have no idea where the website id=3 is coming from!!

/squidster
a confused newbie

Hi,

You may have overlooked it, but you are using &idSite=3 in your iFrame URL :smile:

Thanks man, I’m an idiot!!

1 Like