Get Service URL
    • PDF

    Get Service URL

    • PDF

    Article Summary

    This API checks live playback URL, time machine URL, and thumbnail URL of the channel generated by Live Station.

    Request

    GET https://livestation.apigw.ntruss.com/api/v2/channels/{channelId}/serviceUrls?serviceUrlType={serviceUrlType}
    

    Request parameter

    ParameterRequiredTypeLimitationsDescription
    serviceUrlTypeYesStringGENERAL, TIMEMACHINE, THUMBNAILGENERAL : HLS and MPEG-DASH live playback URL
    Timemachine : Reverseable HLS URL (Only available when ON_AIR is on a channel using DVR (time machine) settings.)
    THUMBNAIL : Thumbnail URL

    Request header

    HeaderRequiredDescription
    x-ncp-apigw-timestampYESIt is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC.
    If the time difference with the API Gateway server is more than 5 minutes, the request is considered invalid.
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-keyYESAccess Key ID issued from the NAVER CLOUD PLATFORM portal.
    x-ncp-iam-access-key:{Sub Account Access Key}
    x-ncp-apigw-signature-v2YESSignature encrypted with your Access Key ID and Secret Key.
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    Content-TypeYESSet the request body content type to application/json.
    Content-Type: application/json
    x-ncp-region_codeYESRegion code (KR)

    Response

    FieldTypeDescriptionNote
    nameString
    urlString
    resizedUrlList
    resizedUrl.typeString
    resizedUrl.urlString
    resolutionString
    videoBitrateString
    audioBitrateString

    Examples

    General Request example

    GET /api/v2/channels/{channelId}/serviceUrls?serviceUrlType=GENERAL
    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
    

    General Response example

    HTTP/1.1 200 OK
    Server: nginx
    Date: Wed, 12 Sep 2018 09:53:32 GMT
    Content-Type: application/json;charset=utf-8
    Connection: keep-alive
    Access-Control-Allow-Origin: *
    x-ncp-trace-id: 36c9k60om4p3238cpmc9gm4cj4
    
    {
       "content" : [
          {
             "name":"720p-16-9",
             "url":"https://test123.cdn.ntruss.com/live/video/ls-20200326194008-jk9ld/720p-16-9/playlist.m3u8",
             "resolution":"1280x720",
             "videoBitrate":"2500000",
             "audioBitrate":"128000"
          },
          {
             "name":"480p-16-9",
             "url":"https://test123.cdn.ntruss.com/live/video/ls-20200326194008-jk9ld/480p-16-9/playlist.m3u8",
             "resolution":"854x480",
             "videoBitrate":"1200000",
             "audioBitrate":"128000"
          },
          {
             "name":"360p-16-9",
             "url":"https://test123.cdn.ntruss.com/live/video/ls-20200326194008-jk9ld/360p-16-9/playlist.m3u8",
             "resolution":"640x360",
             "videoBitrate":"800000",
             "audioBitrate":"96000"
          },
          {
             "name":"audio-192k",
             "url":"https://test123.cdn.ntruss.com/live/video/ls-20200326194008-jk9ld/audio-192k/playlist.m3u8",
             "audioBitrate":"192000"
          },
          {
            "name":"ABR",
             "url":"https://test123.cdn.ntruss.com/live/video/ls-20200326194008-jk9ld/playlist.m3u8"
          },
          {
             "name":"dash",
             "url":"https://test123.cdn.ntruss.com/live/video/ls-20200326194008-jk9ld/live.mpd"
          }
       ]
    }
    

    Thumbnail Request example

    GET /api/v2/channels/ls-20210625135517-XeRA2/serviceUrls?serviceUrlType=THUMBNAIL
    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
    

    Thumbnail Response example

    HTTP/1.1 200 OK
    Server: nginx
    Date: Wed, 12 Sep 2018 09:53:32 GMT
    Content-Type: application/json;charset=utf-8
    Connection: keep-alive
    Access-Control-Allow-Origin: *
    x-ncp-trace-id: 36c9k60om4p3238cpmc9gm4cj4
    
    {
      "content": [
        {
          "name": "thumbnail",
          "url": "https://test123.cdn.ntruss.com/live/image/ls-20210625135517-XeRA2/thumbnail.jpg",
          "resizedUrl": [
            {
              "type": "100px",
              "url": "https://test123.cdn.ntruss.com/live/image/ls-20210625135517-XeRA2/100px/thumbnail.jpg"
            },
            {
              "type": "360px",
              "url": "https://test123.cdn.ntruss.com/live/image/ls-20210625135517-XeRA2/360px/thumbnail.jpg"
            },
            {
              "type": "720px",
              "url": "https://test123.cdn.ntruss.com/live/image/ls-20210625135517-XeRA2/720px/thumbnail.jpg"
            }
          ]
        }
      ]
    }
    

    Error codes

    If the Live Station API request is invalid or if an error occurs during processing, it returns a success/failure to HTTP status code and returns a detailed message in JSON format.

    There are two error codes: 'Common error codes' and 'API Gateway error codes' in the Live Station API.

    Error codeResponse messageDescription
    250000Unexpected error occurred.An error has occurred.
    250001{0}An error has occurred.
    250002{0}: invalid value.
    250003Missing required header.
    250004{0} not found.
    250005{0} not available.
    250006Unauthorized {0}.
    250007{0} connection failed.
    250008Request failed.
    250009Third-party interface exception: {0}.An internal error has occurred.
    250010We cannot accomplish the task as permissions are not granted for the sub account.
    Please modify permissions for the account through the Sub Account service.
    250011{0} must has a valid value
    250012Invalid request data,please check
    250013OK
    250014Form validation failed
    250015Access denied
    250016Server errorA server error has occurred.
    250017UnauthorizedYou do not have permission on the request resource.
    250018Bad Request
    250019The Region {0} not support now.
    250020Invalid region code {0}.
    250021Invalid parameter type.{0} can not convert to type {1}.
    250022The url that you specified is not invalid format.
    250100Channel is not found
    250101This channel is not publishing now
    250102This channel is publishing
    250103This channel has never been published.
    250104Channel names can be entered with a minimum of 3 characters and a maximum of 20 characters. Special character “_” allowed.
    250105Start publish failed
    250106Stop publish failed
    250107This channel's CDN is not running
    250108CDN secure token cannot set
    250109If CDN status is creating or changing, channel cannot be deleted.
    250110Cannot create channel, reason: {0}
    250111Wrong notification type
    250112Cannot configure Notification
    250113In order to return channel, CDN must be returned first.
    250114Channel can be deleted only in 'READY' state.
    250115The channel didn't set DVR
    250116The request did not include the required "QualitySet"
    250118The request did not include the required "CDN_TYPE"
    250119The cdnInstanceNo is needed when createCdn is false.
    250120The cdn type that you specified is not allowed: only "CDN_PLUS", "GCDN" is supported.
    250121The request channel did not set useDvr.
    250122The timemachineMin should be 360.
    250123The specified channel Id does not exist.
    250124The request does not allowed: You can get url only cdn status is "RUNNING"
    250125The request does not allowed: You can get url only channel status is "READY"
    250126The number of professional type can not exceed 5 : targetPlatform is allowed between 1 and 5
    250127The plan type that you specified is not allowed.
    250128The number of standard plan type can not exceed 3 : targetPlatform is allowed between 1 and 3
    250129The input of rtmp url that you specified is not allowed
    250130The restream targetName value that you specified is not allowed : [STEAM, MIXER , TWITCH , YOUNOW , USTREAM , AFREECA_TV , NAVER_TV , V_LIVE, LINE_TV , PRISM, LIVESTATION, CUSTOM] ar e supported.
    250131The channel value that you specified is not allowed.
    250133The request channel did not set useDvr
    250134The request channel status is no "PUBLISHING"
    250135The request does not allowed : the recording has been start already
    250136The request does not allowed : the recording has been start already
    250137The request does not allowed : the recording status is not "TRUE"
    250138The param timemacineMin is needed when useDvr is true.
    250139The param immediateOnair should be false when NO_RECORD set
    250140Cdn status should be running when create channel.
    250141You can get time machine url only recording status is TRUE.
    250142ChannelName should not be null.
    250143The request did not include the required "stream key".
    250151The detail path can be at least 1 character, up to 20 characters and must start with '/'. (include English, /, -, _, numbers)
    250300Quality is not found.
    250301The qualitySetId that you specified not found.
    250302Quality set must have only one 1080p quality.
    250303Delete system quality profile is not allowed.
    250304Invalid user info.
    250305System resource cannot update
    250306Resource is in use
    250307The segment duration value that you specified is not allowd (exceeds valid limit or wrong type) : valid value is allowed integer value between 1000 and 10000 in 500 units is supported. (unit : milliseconds )
    250309The segment count value that you specified is not allowed (exceeds valid limit or wrong type): valid value is allowed integer between 2 and 10
    250311Delete system quality set is not allowed.
    250312Only Alphabets, Numbers and Hypen are allowed. The length must be between 3 and 20 characters.
    250313quality size error (min:1, max:4)You can set 1 to 4 quality settings.
    250314Video codec must have a value
    250315Video codec profile must have a value
    250316Video codec profile level must have a value
    250321Video bitrate must be greater than or equal to 1
    250322Video bitrate must be less than or equal to 20000000
    250323Video B frames must be greater than or equal to 0
    250324Video B frames must be less than or equal to 4
    250325Audio codec must have a value
    250327Audio sampling rate must have a value
    250328Audio channels must have a value
    250333{0} Profile only when AAC
    250334bFrames only 0 is available if resolution less than 409920(854*480)
    250335bFrames only 0,1,2 are available if resolution less than 921600 (1280*720)
    250336Video frame rate must be greater than or equal to 1
    250337Video frame rate be less than or equal to 60
    250338Audio channels must be greater than or equal to 0
    250339Audio channels must be less than or equal to 8
    250341Only profile 'BASELINE' available for resolution less than 921600 (1280*720)
    250342Only even integer are available for video width and height
    250343Interval must bigger than 0
    250344Must input key
    250345Must input header
    250348The request did not set content-type to "application/json"
    250351The timedmeta that you specified is not allowed: only integer "1000" is supported.
    250353The audio codec that you specified is not allowed: only "AAC", "MP3" audio codec is supported.
    250354The profile value of audio codec that you specified is not allowed: only profile LC is supported.
    250355The audio channel value that you specified is not allowed: only audio channel value [0, 1,2,3,4,5,6,7,8] are supported
    250356The audio channel value that you specified is not allowed: only audio channel value [0, 1, 2] are supported.
    250357The audio bitrate value that you specified is not allowed(exceed valid limit or wrong type): valid value is allowed integer between 16 and 320.
    250358The audio sampling rate that you specified is not allowed: only audio sampling rate value AAC: [8000, 11025, 12000, 16000, 22050, 24000,32000, 44100, 48000, 64000,88200,96000] are supported.
    250359The audio sampling rate that you specified is not allowed: only audio sampling rate value MP3:[8000,11025, 12000,16000,22050,24000,32000,44100,48000] are supported.
    250360The video codec that you specified is not allowed: only "H264" format is supported.
    250361The profile of video codec that you specified is not allowed: only profile value [BASELINE, MAIN, HIGH] are supported.
    250362The orientation of video that you specified is not allowed: only [FIX] is supported.
    250363The profile level of video that you specified is not allowed. only [0] is supported
    250364The reference frames of video that you specified is not allowed, only [1] is supported.
    250365The video  bitrate value that you specified is not allowed: video bitrate value is an integer greater than 0
    250366The width of video that you specified is not allowed: only width [integer between 128 and 1920] are supported.
    250367The height of video that you specified is not allowed: only height [integer between 96 and 1920] are supported.
    250368The frame rate of video that you specified is not allowed : only frame rate value [10, 15, 23.97, 24, 29.97, 30, 50, 60] are supported.
    250370The rate control of video that you specified is not allowed : only width [VBR, CBR] are supported.
    250372The request did not include the required "video" object
    250373The request did not include the required "audio " object
    250374Delete system quality profile is not allowed.
    250375The request did not include the required "timedMetadata" object.(if "enableHlsTimedMetadata": true, timedMetadata object should be included.)
    250376The timedmeta that you specified of key is not allowed: only "utc" is supported.
    250377The request did not include the required "enableHlsTimedMeta"
    250378The request do not include the required "audio bitrate"
    250500Record filename is not valid : {0}
    250501Record filename is not found : {0}
    250502Record file upload error
    250504Can not delete Record file: {0}
    250505Can't get objectStorage's access oAuthFailed to acquire access to Object Storage.
    250506ChannelId param should not be null when get record list.The ChannelID parameter is required.
    250507Record status should be TRANSFER_READY or TRANSFER_FAIL when upload.The recording file is not in an uploadable state.
    It allows TRANSFER_READY, TRANSFER_FAIL status
    250600Number must bigger than or equal to 1
    250700The record id has been requested already.
    250701The record id that you request upload does not exist.
    250702The record id does not exist.
    250703The input bucket name that you specified is not allowed.
    250704The output bucket name that you specified is not allowed.
    250705The input bucket name doesn't exist.

    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.