Skip to content

fix(migrate-tool): use apiKey+apiSecret for server-side SDK auth instead of bearer token#14496

Merged
dylanjeffers merged 1 commit into
mainfrom
fix/migrate-tool-api-secret
Jun 18, 2026
Merged

fix(migrate-tool): use apiKey+apiSecret for server-side SDK auth instead of bearer token#14496
dylanjeffers merged 1 commit into
mainfrom
fix/migrate-tool-api-secret

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #14392. Switches the migrate-tool's server-side SDK initialization from a bearer token to apiKey + apiSecret (Basic auth), which is cleaner for app-level server-side operations.

The SDK's EntityManager relay call in manageEntity accepts either Authorization: Bearer <bearerToken> or Basic base64(apiKey:apiSecret). Using apiKey+apiSecret lets the developer app authenticate and sign its own requests server-side without an OAuth-derived bearer token.

Changes

  • api/_lib/audius.tsgetServerSDK() now reads AUDIUS_API_SECRET and passes apiSecret to createSdkWithServices instead of bearerToken. Updated error message and doc comment.
  • .env.exampleAUDIUS_BEARER_TOKENAUDIUS_API_SECRET.
  • README.md — env var documentation updated to reference the API Secret.

The unrelated ADMIN_BEARER_TOKEN escape hatch for admin endpoints is untouched.

Verification

🤖 Generated with Claude Code

…ead of bearer token

The server-side SDK in api/_lib/audius.ts now initializes
createSdkWithServices with apiKey + apiSecret (Basic auth) rather than a
bearer token. apiSecret authenticates the developer app and signs its
requests server-side, which is cleaner for app-level operations and never
exposed to the browser. Updates .env.example and README accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 52e0668

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dylanjeffers dylanjeffers merged commit e453591 into main Jun 18, 2026
3 checks passed
@dylanjeffers dylanjeffers deleted the fix/migrate-tool-api-secret branch June 18, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant