Create a new app
client.calls.sfu.create(SFUCreateParams { account_id, name } params, RequestOptionsoptions?): SFUCreateResponse { created, modified, name, 2 more }
POST/accounts/{account_id}/calls/apps
Creates a new Cloudflare calls app. An app is an unique enviroment where each Session can access all Tracks within the app.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
Create a new app
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const sfu = await client.calls.sfu.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353' });
console.log(sfu.uid);{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"created": "2014-01-02T02:20:00Z",
"modified": "2014-01-02T02:20:00Z",
"name": "production-realtime-app",
"secret": "66bcf64aa8907b9f9d90ac17746a77ce394c393b92b3916633dc02846e608ad4",
"uid": "2a95132c15732412d22c1476fa83f27a"
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"created": "2014-01-02T02:20:00Z",
"modified": "2014-01-02T02:20:00Z",
"name": "production-realtime-app",
"secret": "66bcf64aa8907b9f9d90ac17746a77ce394c393b92b3916633dc02846e608ad4",
"uid": "2a95132c15732412d22c1476fa83f27a"
}
}