For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
      • Datasphere
      • Fabric
        • Addresses
        • AI Agents
        • Call Flows
        • Conference Rooms
        • cXML Applications
        • cXML Scripts
        • cXML Webhooks
        • FreeSWITCH Connectors
        • RELAY Applications
        • Resources
        • SIP Endpoints
        • SIP Gateways
        • Subscribers
        • SWML Scripts
        • SWML Webhooks
        • Tokens
          • createEmbedToken
          • createGuestToken
          • createInviteToken
          • createSubscriberToken
          • refreshSubscriberToken
      • ImportedNumbersResource
      • Logs
      • LookupResource
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Response Example
  • Example
REST ClientFabricTokens

createSubscriberToken

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

refreshSubscriberToken

Next
Built with

Create a subscriber authentication token.

Request

referencestringRequired
A string that uniquely identifies the subscriber. Often it's an email, but can be any other string.
expire_atintegerOptional
A unixtime (the number of seconds since 1970-01-01 00:00:00) at which the token should no longer be valid. Defaults to 'two hours from now'
application_idstringOptionalformat: "uuid"
The ID of the application that the token is associated with.
passwordstringOptional
Set or update the subscriber's password. Omit this field or pass an empty string if you don't want to update the password.
first_namestringOptional
Set or update the first name of the subscriber.
last_namestringOptional
Set or update the last name of the subscriber.
display_namestringOptional
Set or update the display name of the subscriber.
job_titlestringOptional
Set or update the job title of the subscriber.
time_zonestringOptional
Set or update the time zone of the subscriber.
countrystringOptional
Set or update the country of the subscriber.
regionenumOptional
A routing override that controls which regional cluster the SDK connects to.
Allowed values:
company_namestringOptional
Set or update the company name of the subscriber.

Response

subscriber_idstringRequiredformat: "uuid"
The ID of the subscriber that the token is associated with.
tokenstringRequiredformat: "jwt"
The token that is associated with the subscriber.
refresh_tokenstringRequiredformat: "jwt"
Refresh token.

Response Example

Response
1{
2 "subscriber_id": "32d94154-9297-418c-9a85-4a69e0c67c30",
3 "token": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIiwidHlwIjoiU0FUIn0..HahMYxqt4uI14qSH.daMTBR53lfEfEFiVAhr0pPSRqZhEod_YzavoG9-4ieiRQvl8GtP3FFNx0VLfkJqNcjUNbAaiKrEMnfOtCnQjiq1Kn0Iq90MYdM00QJ7cTaQ88vfbqdE92p-d4oDeg6z_vAsgrFgEobmrlDQndKxCWOD921iYxyLP0vqNaokN3kIM06iAWu_UpnTYEeR1l068xhK2xb6P9wbI2FDKFQoMgCdbjvABF7RRyaEzUoaQ5_Wj53YO6PFYuYcPbqMhdtvSSQiK3Nw6bFer2OfFs6s2RTukRGsocgC5Q7pwQwzYky-YgrPCb-pVAJajVSXUJrayvOi8-TeyCpICW4zTeJa5icZ380cWtafUH4rEB_FOJciJf0BCy48ajbz0NE121uBl2mqA1HE0_mQA53UqVjbrbE9hVOfnN4KpwOfULhIjx54tIekJQgG-aK2AYsLPCDNhuSpHvdwJcTM0Gzy3mS2veyaDV8q2qN5F_F9OThTQzcfy.AXzVNrJc_pGVPsticsVM0w",
4 "refresh_token": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIiwidHlwIjoiUmVmcmVzaCIsImNoIjoidGVzdHB1Yy5zaWduYWx3aXJlLmNvbSJ9..sHcQL_V1tZH2JEAh.FNKYe_49CazNthkgSphf-ov8_I2wGLGWKD6t2q7kiG0guBxBjGzpgD8Y-LM-Nu7ePRUg7Z6vBkKAvh3rjtZpkeXoRXobJ1lov9AO72l8tB9K9RLo-TnBxLDbh0BCDGWVBgGq8DOh9kzHz4Tot-_B8pHXY_bqXX5kC4UUszXCO9nhSi1a4rp6QMD_8b0Mm8pHDK9EtW8I-tfM0HPmXuPMuOnlft3hmZo3tiKN2CarWscveQPCGetufHfQJJssdHjjYup8USAX0gJM8dpsV7FpF9fxfpy4ZU7N9MJXgSYJM5cPrxpLLx3Lj291egob14jDkn7kZQpv7jbCtsGyYxC7HAi1FgGr_sw3AeGaf2esGCkaeE11MxL05_kwdiNYBSOaHqaY62kOzu5pIdfTKQekOogCS1fgiyBgisBZeSIEBWWF.neE9KnL5AzS165dXFXUqhQ"
5}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com"
7});
8
9const token = await client.fabric.tokens.createSubscriberToken({ reference: "subscriber-id" });
10console.log(`Token: ${token.token}`);