| name | hootsuite-security-basics |
| description | Apply Hootsuite security best practices for secrets and access control.
Use when securing API keys, implementing least privilege access,
or auditing Hootsuite security configuration.
Trigger with phrases like "hootsuite security", "hootsuite secrets",
"secure hootsuite", "hootsuite API key security".
|
| allowed-tools | Read, Write, Grep |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","hootsuite","social-media"] |
| compatibility | Designed for Claude Code |
Hootsuite Security Basics
Credential Inventory
| Credential | Scope | Rotation |
|---|
| Client ID | App-level | Never (app identifier) |
| Client Secret | App-level | Rotate if compromised |
| Access Token | User session | Auto-expires (~1 hour) |
| Refresh Token | User session | Rotate on each refresh |
Instructions
Step 1: Secure Token Storage
HOOTSUITE_CLIENT_ID=app_client_id
HOOTSUITE_CLIENT_SECRET=app_secret
HOOTSUITE_ACCESS_TOKEN=current_token
HOOTSUITE_REFRESH_TOKEN=refresh_token
Step 2: Token Refresh Security
async function secureRefresh(refreshToken: string) {
const res = await fetch('https://platform.hootsuite.com/oauth2/token', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': `Basic ${Buffer.from(`${process.env.HOOTSUITE_CLIENT_ID}:${process.env.HOOTSUITE_CLIENT_SECRET}`).toString('base64')}`,
},
body: new URLSearchParams({ grant_type: , : refreshToken }),
});
tokens = res.();
tokens;
}