Create channel
    • PDF

    Create channel

    • PDF

    Article Summary

    An API to create Re-Stream channels of Live Station. Provides the Channel list view API and the Channel information view API to view the created Re-Stream channels.

    Requests

    POST https://livestation.apigw.ntruss.com/api/v2/re-stream/channels
    

    Request headers

    Header nameRequiredDescription
    x-ncp-apigw-timestampYESTime elapsed since January 1, 1970 00:00:00 UTC in milliseconds. The request is considered invalid if the time difference compared to the API Gateway server is 5 minutes or longer
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-keyYESAccess key ID value issued from NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Sub Account Access Key}
    x-ncp-apigw-signature-v2YESSignature encrypted with the access key ID value and secret key
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    Content-TypeYESSpecifies the request body content type as application/json
    Content-Type: application/json
    x-ncp-region_codeYESRegion code (KR)

    Request bodies

    Field nameRequiredTypeService limitsDescription
    channelNameYesString3 to 20 characters can be entered. Underscores (_) allowedName of the channel to be created
    envTypeOptionalStringDEV, STAGE, REALSettings for usage classification of the channel to be created. Will be set to REAL if not entered
    planTypeYesStringSTANDARD, PROFESSIONAL
    restreamYesObject[]
    restream[].targetNameYesStringYOUTUBE, CHZZK, STEAM, YOUNOW, USTREAM, AFREECATV, PRISM, CUSTOMPlatform name to be re-streamed
    restream[].rtmpUrlYesString
    restream[].streamKeyYesString
    restream[].idNoStringRTMP authentication ID
    restream[].passwordNoStringRTMP authentication password

    Responses

    Field nameTypeDescriptionNote
    channelIdString
    channelNameString
    envTypeStringDEV, STAGE, REAL
    instanceNoInteger
    channelStatusStringCREATING, READY, PUBLISH, DELETED, BLOCK, FORCE_BLOCK, FORCE_DELETED
    createdTimeInteger
    streamKeyString
    publishUrlString
    globalPublishUrlStringURL for supporting overseas streaming
    planTypeStringSTANDARD, PROFESSIONAL
    restreamObject[]
    restream[].targetNameString
    restream[].rtmpUrlString
    restream[].streamKeyString
    restream[].idString
    restream[].passwordString
    platformCountInteger
    totalPublishSecondsInteger
    alertOnBoolean
    isPublishingBoolean

    Examples

    Request examples

    POST /api/v2/re-stream/channels
    HOST: livestation.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-timestamp:1521787414578
    x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgy
    x-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=
    x-ncp-region_code:KR
    
    {
       "channelName":"myrestream",
       "planType":"STANDARD",
       "restream":[
          {
             "targetName":"YOUTUBE",
             "rtmpUrl":"rtmp://notworking-just-testcase.only"
          },
          {
             "targetName":"TWITCH",
             "rtmpUrl":"rtmp://notworking-just-testcase.only",
             "streamKey":"12345",
             "id":"itisid",
             "password":"itispassword"
          }
       ]
    }
    

    Response examples

    HTTP/1.1 200 OK
    Server: nginx
    Date: Mon, 2 Mar 2021 09:53:32 GMT
    Content-Type: application/json;charset=utf-8
    Connection: keep-alive
    Access-Control-Allow-Origin: *
    x-ncp-trace-id: 36c9k60om4p3238cpmc9gm4cj4
    
    {
       "content":{     
          "channelId":"ls-20200327014626-Nh91v",
          "channelName":"myrestream",
          "instanceNo":1168812,
          "channelStatus":"READY",
          "createdTime":1585241186000,
          "streamKey":"7hdxzm1d1234du3qs",
          "publishUrl":"rtmp://live-station-rtmp-url",
          "globalPublishUrl": "rtmp://live-station-global-rtmp-url",
          "planType":"STANDARD",
          "restream":[        
             {
                "targetName":"YOUTUBE",
                "rtmpUrl":"rtmp://notworking-just-testcase.only"
             },
             {
                "targetName":"TWITCH",
                "rtmpUrl":"rtmp://notworking-just-testcase.only",
                "streamKey":"12345",
                "id":"itisid",
                "password":"itispassword"
             }
          ],
          "platformCount":2,
          "totalPublishSeconds":0,
          "alertOn":false,
          "isPublishing":false,
          "envType": "REAL"
       }
    }
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.