A short-lived in-app calling token
POST
/v1/mobile/voice/token
const url = 'https://api.vocapable.com/v1/mobile/voice/token';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"platform":"ios","purpose":"calls"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.vocapable.com/v1/mobile/voice/token \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "platform": "ios", "purpose": "calls" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
MobileVoiceTokenRequest
object
platform
required
Platform
string
purpose
Purpose
string
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
MobileVoiceToken
A short-lived carrier Voice token for this person in this company only.
object
token
required
Token
string
identity
required
Identity
string
expires_at
required
Expires At
string format: date-time
platform
required
Platform
string
incoming_push_enabled
required
Incoming Push Enabled
boolean
purpose
Purpose
string
Example
{ "platform": "ios", "purpose": "calls"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}