docs: update API token samples to the new swapi_ format - #690
Open
Devon-White wants to merge 2 commits into
Open
Devon-White wants to merge 2 commits into
Devon-White wants to merge 2 commits into
Conversation
Project API tokens now begin with `swapi_` and are 42 characters long, replacing the `PT` prefix and 50-character length. Existing tokens are unaffected and there is no migration. - Replace every sample token value in MDX and TypeSpec, including the base64-encoded Basic auth examples on both authorization pages. - Document the format and the opaque-string guidance on the API credentials page, with a short pointer from the authorization pages. - Add a changelog entry for 2026-09-14. - Correct the Browser SDK v3 `createRoomObject` option table, which described its `token` as a project token; the page's own example passes a Video Room Token. Closes #679
Contributor
…-format # Conflicts: # fern/products/platform/changelog/2026-09-14.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #679.
Project API tokens now begin with
swapi_and are 42 characters long, replacing thePTprefix and 50-character length. Tokens created before the change keep working, so this PR only updates sample values and adds the format to the docs.Sample values replaced
Every project API token sample in MDX and TypeSpec now uses the canonical placeholder from the issue,
swapi_0123456789ab0123456789ab0123456789ab, or a masked 42-character equivalent.specs/signalwire-rest/project-api/tokens/models/core.tsp@exampleonCreateTokenResponse.tokenspecs/compatibility-api/tokens/models/core.tsp@exampleonToken.tokenfern/products/apis/pages/core/authorization.mdxfern/products/compatibility-api/pages/rest-api/core/authorization.mdxfern/products/compatibility-api/pages/cxml/guides/sending-your-first-sms.mdxfern/products/server-sdks/pages/guides/manage-resources/account-setup.mdx.../integrations/FreeSWITCH/sending-an-sms-from-freeswitch-xml-dialplan-through-signalwire-cloud.mdxapi_token=in the dialplan sampleThe base64 examples on the two authorization pages hid a
PTtoken inside the encoded value, so each was decoded, updated, and re-encoded rather than edited in place.Documentation added
A
### Token formatsection on API credentials states both formats, confirms existingPTtokens are not deprecated and need no migration, and tells readers to treat a token as an opaque string. Both authorization pages carry a short pointer to it.fern/products/platform/changelog/2026-09-14.mdxrecords the change for customers, taggedapis.Unrelated fix worth a look
fern/snippets/browser-sdk/v3/create-room-object-options.mdxdescribed thetokenoption ofcreateRoomObjectas a "SignalWire project token" with aPTexample. That is wrong: the same reference page passestoken: "<YourJWT>"in its own example, and a browser SDK never takes a project API token. Rather than carry the error forward with aswapi_value, the row now describes a Video Room Token and links to the Create Room Token endpoint. Happy to split this out if you would rather keep the PR to the format change.Two things to confirm
PTrather than naming a cutover date, so the prose stays correct if the deploy date moved.Checks
yarn build:specssucceeds; both regenerated OpenAPI files are committed and their only diff is the token example.yarn fern-md-checkpasses over all 2747 MDX files.yarn fern-checkreports only a missing-redirects check skipped because it could not reach FDR from this environment (403). That is unrelated to these changes.slug:frontmatter. No anchor fragments were touched.