From hootsuite-pack
Configures Hootsuite OAuth 2.0 for REST API with app registration, .env setup, and TypeScript code for authorization flow, token exchange, and refresh.
How this skill is triggered — by the user, by Claude, or both
Slash command
/hootsuite-pack:hootsuite-install-authThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Configure Hootsuite REST API OAuth 2.0 authentication. Hootsuite uses OAuth 2.0 with Bearer tokens. You register an app in the Hootsuite Developer Portal, get client credentials, and exchange authorization codes for access tokens.
Configure Hootsuite REST API OAuth 2.0 authentication. Hootsuite uses OAuth 2.0 with Bearer tokens. You register an app in the Hootsuite Developer Portal, get client credentials, and exchange authorization codes for access tokens.
https://your-app.com/callback# .env (NEVER commit)
HOOTSUITE_CLIENT_ID=your_client_id
HOOTSUITE_CLIENT_SECRET=your_client_secret
HOOTSUITE_REDIRECT_URI=https://your-app.com/callback
HOOTSUITE_ACCESS_TOKEN= # Populated after OAuth flow
# .gitignore
.env
.env.local
// auth.ts — OAuth 2.0 authorization code flow
import 'dotenv/config';
const { HOOTSUITE_CLIENT_ID, HOOTSUITE_CLIENT_SECRET, HOOTSUITE_REDIRECT_URI } = process.env;
// Step 1: Redirect user to authorize
function getAuthUrl(): string {
const params = new URLSearchParams({
response_type: 'code',
client_id: HOOTSUITE_CLIENT_ID!,
redirect_uri: HOOTSUITE_REDIRECT_URI!,
scope: 'offline',
});
return `https://platform.hootsuite.com/oauth2/auth?${params}`;
}
// Step 2: Exchange authorization code for tokens
async function exchangeCode(code: string) {
const response = await fetch('https://platform.hootsuite.com/oauth2/token', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': `Basic ${Buffer.from(`${HOOTSUITE_CLIENT_ID}:${HOOTSUITE_CLIENT_SECRET}`).toString('base64')}`,
},
body: new URLSearchParams({
grant_type: 'authorization_code',
code,
redirect_uri: HOOTSUITE_REDIRECT_URI!,
}),
});
const tokens = await response.json();
console.log('Access Token:', tokens.access_token);
console.log('Refresh Token:', tokens.refresh_token);
console.log('Expires In:', tokens.expires_in, 'seconds');
return tokens;
}
// Step 3: Refresh expired token
async function refreshToken(refreshToken: string) {
const response = await fetch('https://platform.hootsuite.com/oauth2/token', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': `Basic ${Buffer.from(`${HOOTSUITE_CLIENT_ID}:${HOOTSUITE_CLIENT_SECRET}`).toString('base64')}`,
},
body: new URLSearchParams({
grant_type: 'refresh_token',
refresh_token: refreshToken,
}),
});
return response.json();
}
async function verifyConnection(accessToken: string) {
const response = await fetch('https://platform.hootsuite.com/v1/me', {
headers: { 'Authorization': `Bearer ${accessToken}` },
});
const user = await response.json();
console.log('Connected as:', user.data.fullName);
console.log('Organization:', user.data.organizationName);
return user;
}
| Error | Cause | Solution |
|---|---|---|
401 Unauthorized | Invalid or expired token | Refresh token or re-authorize |
invalid_client | Wrong client ID/secret | Check app credentials |
invalid_grant | Authorization code expired | Codes expire in 30s; re-authorize |
redirect_uri_mismatch | URI doesn't match | Must exactly match app registration |
After auth, proceed to hootsuite-hello-world for your first API call.
npx claudepluginhub luxdevnet/claude-plus-lux --plugin hootsuite-pack7plugins reuse this skill
First indexed Jul 10, 2026
Showing the 6 earliest of 7 plugins
Configures Hootsuite OAuth 2.0 for REST API with app registration, .env setup, and TypeScript code for authorization flow, token exchange, and refresh.
Guides OAuth client setup with step-by-step instructions, best practices, and production-ready configurations for API integration.
Installs the intercom-client SDK and configures Intercom API authentication via access tokens or OAuth. Use when setting up a new Intercom integration.