Hello,
I’m trying to get usage statistics using account.profiles.usageStatisticList but it returns “Profile/share can’t be found”
Code below. account.profiles.list() works and shows the profiles I have access to.
Would be grateful for a solution.
const { Analysis, Account, Services, Utils } = require("@tago-io/sdk"); async function myAnalysis(context, scope) { try { const env = Utils.envToJson(context.environment); if (!env.account_token) { return context.log("You must setup an account_token in the Environment Variables."); } const account = new Account({ token: env.account_token }); const stats = await account.profiles.usageStatisticList({ profileID: "_my_profileID_" }); console.log(stats); } catch (e) { console.log(e); } } module.exports = new Analysis(myAnalysis);