I'm trying to sign via command line to the token_auth but can't seem to work. I always get the piwik.token_auth = "anonymous";
This is my script:
printf "%bGet form_nonce...%b\n" "${YELLOW}" "${STD}"
curl POST "https://piwik.platform/index.php" >nonce.log
NONCE=$(grep -m 1 "form_nonce" nonce.log |sed -e 's/.*value="//'|sed -e 's/"\/>//')
printf "${NONCE}"
curl -v -D headr.log POST "https://piwik.platform/index.php" -d "form_login=login&form_password=password&form_nonce=${NONCE}" >sign-in.log
Any idea on what could be the problem?
I think you missunderstood how token_auth is working:
Returns an valid token_auth that you can use afterwards.
See https://developer.matomo.org/api-reference/reporting-api#UsersManager for an overview about all methods.
@fdellwing But isn't it weird that the token changes when you refresh the page?
That shouldn't be the case for valid userLogin / md5Password combinations
@sgiehl @fdellwing Thank you, it worked.
BTW: For general questions please ask in the Platform forum as we usually don't answer questions here: https://forum.matomo.org/c/plugins-platform