-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
umami api client - switch to official client #59
Labels
Comments
This was referenced Aug 30, 2024
with next dependency
reported here |
Trying very basic example is not working
env export UMAMI_API_CLIENT_USER_ID=admin
export UMAMI_API_CLIENT_PASSWORD=xxx-replace-by-admin-password-here
export UMAMI_API_CLIENT_SECRET=xxx-replace-by-app-secret-set-in-docker-compose
export UMAMI_API_CLIENT_ENDPOINT=https://myumami.example.fr/api node import {getClient} from '@umami/api-client';
const umamiUsername = process.env.UMAMI_API_CLIENT_USER_ID;
const umamiPassword = process.env.UMAMI_API_CLIENT_PASSWORD;
let client;
const getMeFixed = false;
{
client = getClient();
const {ok, data, status, error} = await client.login(umamiUsername, umamiPassword);
console.log(`login: ${JSON.stringify({ok, data, status, error}, null, 2)}`);
}
if (getMeFixed) {
const {ok, data, status, error} = await client.getMe();
console.log(`getMe: ${JSON.stringify({ok, data, status, error}, null, 2)}`);
}
{
const {ok, data, status, error} = await client.getWebsites();
console.log(`getWebsites: ${JSON.stringify({ok, data, status, error}, null, 2)}`);
} result
on docker side I got server error logs (was the same kind of error for
this issue is close to umami-software/umami/issues/1964 this error is reported here |
This was referenced Aug 31, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
umami has now an official client : https://umami.is/docs/api/api-client
The text was updated successfully, but these errors were encountered: