/spotify-ads-api:configure [oauth [client_id] | token]from spotify-ads-api
Configures Spotify Ads API credentials via OAuth 2.0 with PKCE or direct token. Sets up authentication, ad account, and execution preferences for the plugin.
Ships in spotify-ads-api. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Set up or update the plugin's local settings file for the active platform.
Before sending any output to a human user, read and follow $PLUGIN_ROOT/skills/api-reference/references/language-standards.md.
oauth [client_id] (default)Use Authorization Code with PKCE (S256). The client ID belongs to the user's
team and determines client-level attribution, quotas, and rate-limit isolation.
Never substitute a plugin-global client ID; this plugin does not provide one.
Prerequisites
http://127.0.0.1:8080/callback exactly.uv is available for the standard-library PKCE helper.Choose the active settings file:
.codex/spotify-ads-api.local.md.claude/spotify-ads-api.local.md.agents/spotify-ads-api.local.mdRead that file if it exists. If it does not, read another platform's settings file as defaults, but do not overwrite the other platform's file.
Resolve the team-owned client ID. Use the optional command argument when
supplied. Otherwise, if local settings contain client_id, offer to reuse it;
do not silently replace it. If none exists or the user declines reuse, prompt
for the client ID from the team's Spotify Developer application.
Prompt for auto_execute (default false). Remind the user that the exact
loopback redirect URI above must already be registered, then run the helper.
Pass the active settings path so tokens are written directly to a securely
created file and never enter captured stdout. On Antigravity, resolve
PLUGIN_ROOT to the plugin root (two directories above this skill) because
no plugin-root variable is set.
PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$PWD}}"
python3 "${PLUGIN_ROOT}/skills/configure/scripts/oauth-flow.py" \
--client-id "<team_client_id>" \
--settings-file "<active_settings_file>" \
--auto-execute "<true_or_false>"
If python3 is unavailable, try:
PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$PWD}}"
uv run "${PLUGIN_ROOT}/skills/configure/scripts/oauth-flow.py" \
--client-id "<team_client_id>" \
--settings-file "<active_settings_file>" \
--auto-execute "<true_or_false>"
The helper prints the authorization URL before trying to open a browser. If automatic browser opening fails, tell the user to copy that URL into a browser while the loopback listener continues waiting. Do not recreate the PKCE flow in shell or ask the user to paste a redirect URL: the verifier is ephemeral and must remain only in the helper's memory.
If neither Python 3 nor uv is available, explain that configuration requires
one of those runtimes and stop. Direct-token mode uses the same secure settings
helper, so it is not a runtime-free fallback.
{"settings_file":"<active_settings_file>","auth_flow":"authorization_code_pkce"}
The helper writes access_token, refresh_token, token_expires_at,
client_id, and auth_flow directly to the settings file through an atomic
mode-0600 creation. It does not print tokens and does not require a later
chmod. Keep diagnostics from stderr separate.
If a managed workspace denies the settings write, the helper exits with code 5 and returns only safe paths:
{"settings_file":"<active_settings_file>","pending_token_file":"<private_mode_0600_file>","requires_settings_write":true}
Do not read or print the pending file. Request the scoped workspace permission needed to run this token-free finalization command:
python3 "${PLUGIN_ROOT}/skills/configure/scripts/settings_file.py" oauth-result \
--settings-file "<active_settings_file>" \
--pending-token-file "<pending_token_file>"
On success the writer atomically installs the settings file and deletes the pending token file. If configuration is abandoned, delete that exact pending file after telling the user; it contains live OAuth tokens.
PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-.}}"
api() { "$PLUGIN_ROOT/scripts/api-request.sh" configure "$@"; }
Before the first Ads API v3 call, read and follow
$PLUGIN_ROOT/skills/api-reference/references/live-openapi.md.
api GET "businesses"api GET "businesses/<business_id>/ad_accounts"Update ad_account_id atomically without printing tokens:
python3 "${PLUGIN_ROOT}/skills/configure/scripts/settings_file.py" update-account \
--settings-file "<active_settings_file>" \
--ad-account-id "<selected_ad_account_id>"
api GET "ad_accounts/<ad_account_id>"
After a successful migration from an older OAuth setup, tell macOS users that
the legacy spotify-ads-api-client-secret Keychain item is unused and may be
removed. Do not delete it automatically because an older installed plugin may
still need it.
tokenLegacy direct-token mode for an already-issued bearer token. Do not ask the user to include the token in the slash command or paste it into the chat.
auto_execute (default false). Ask the user to run the command
below in their terminal so the helper can collect the token through a
non-echoing prompt attached directly to that terminal. Do not execute this
command through an agent Bash tool: its secure prompt requires the user's
controlling terminal. The writer sets auth_flow: "direct_token" and
leaves refresh_token, token_expires_at, and client_id empty.python3 "<absolute_plugin_root>/skills/configure/scripts/settings_file.py" direct-token \
--settings-file "<absolute_active_settings_file>" \
--prompt \
--auto-execute "<true_or_false>"
Resolve both absolute paths before presenting the command. If python3 is
unavailable, use uv run in place of python3. Wait for the user to confirm
that the helper returned its token-free settings-file receipt before
continuing.
3. Use the same businesses → ad accounts discovery flow, or ask for an account
ID if discovery fails, then update ad_account_id.
4. Verify the selected account with the request wrapper.
---
access_token: "<token>"
refresh_token: "<refresh_token>"
token_expires_at: "<ISO 8601 timestamp>"
client_id: "<team_client_id>"
auth_flow: "authorization_code_pkce"
ad_account_id: "<uuid>"
environment: "production"
auto_execute: false
---
# Spotify Ads API Settings
Local configuration for the spotify-ads-api plugin.
Do not commit this file to version control.
For direct-token mode, set auth_flow: "direct_token" and leave
refresh_token, token_expires_at, and client_id empty.
.codex/*.local.md,
.claude/*.local.md, and .agents/*.local.md.auth_flow may use an unexpired
access token, but it cannot refresh. Run OAuth configuration once to replace
it with PKCE-issued tokens.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
20 skills in this plugin
/account-adminAdminister Spotify Ads API businesses and ad accounts: discover businesses and accounts, inspect or update supported profile and billing fields, create businesses or ad accounts, list members and roles, invite users, assign ad-account access, update roles, cancel invitations, and remove access. Use when a user asks to find an ad account by ID, audit access, onboard an agency or teammate, manage business/ad-account membership, or update supported account identity details./adsList or get Spotify Ads API ad sets and ads, and stage their creation or updates through drafts by default. Use direct live writes only when explicitly requested./spotify-ads-api-referenceThis skill should be used when the user asks to "call the Spotify Ads API", "create a Spotify ad campaign", "manage Spotify ads", "pull Spotify ad reports", "set up ad sets or ads", "upload ad assets", "target audiences on Spotify", "check campaign status", "get ad account info", "look up API schema or fields", "check what targeting options exist", or asks about Spotify advertising endpoints, request/response formats, enum values, or authentication.npx claudepluginhub spotify/ads-agentic-tools --plugin spotify-ads-apiOther plugins' skills for the same job