Geovane - When using an API that requires Admin...
# dev-help
g
When using an API that requires Admin auth, such as https://rest-api-sdk-v2-0.vercel.app/#/http/api-endpoints/groups/update-user-group, which Admin TS user should I use? I see a previously created user in our TS Platform called
tsadmin
. Is it fine to use this one, or should I do something else?
a
message has been deleted
s
Use an account that has the required admin privileges, not a specific hardcoded username. For
updateUserGroup
, the caller must have: -
ADMINISTRATION
privilege - If RBAC is enabled:
GROUP_ADMINISTRATION
privilege So
tsadmin
is fine only if that user has those privileges in your environment. Best practice is to avoid using a personal/human admin account for integrations and instead create a dedicated service account (API user) with least privilege required (here: group admin capabilities), then use that account’s credentials/token for automation. If your current
tsadmin
is a shared platform admin user, it can work short-term, but long-term you should move to a service account for auditability and safer credential rotation.
s
@Geovane is the solution from SpotterCode working?
g
@Swarnika tsadmin is the one I've been using since it was previously created by Thoughtspot automatically and is not attached to "a person". My main goal asking here was to be sure that I am following the best practices 🙂