Channel
    • PDF

    Channel

    • PDF

    Article Summary

    Provides information about the APIs for creating, editing, and deleting channels.

    View-all-channels API

    You can view all channels.

    Request URL

    GET https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels
    

    Request headers

    HeaderDescription
    x-project-id- Dashboard > Settings > Project settings > Project ID
    x-api-key- Dashboard > Settings > Project settings > API Key

    Request query parameters

    ParameterTypeRequiredDescription
    filterStringOPlease use {} as the default method of entry. The filter can be used to search some of the fields.
    sortStringXDefine the filter for the fields you want to sort. e.g., Descending order {"createdAt":"-1"} / ascending order {"createdAt":"1"}
    optionStringXRefer to the following when there are options. ex) {"offset":0,"per_page":20}

    Request examples

    curl -X 'GET' \
      'https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels?filter=%7B%22state%22%3A%221%22%7D' \
      -H 'accept: application/json' \
      -H 'x-project-id: 339c2b1c-d35b-47f2-828d-xxxxxxxxx' \
      -H 'x-api-key: 4302925661f70ce7c14xxxxxxxxxxxxxxxxxxxx'
    
    

    Response examples (normal)

    
    [
      {
        "id": "5498fee1-bfdf-4d50-8017-xxxxxxxxxxxxx",
        "project_id": "339c2b1c-d35b-47f2-828d-xxxxxxxxx",
        "name": "Channel-1",
        "user_id": "0e596be1-2ef0-4a79-a105-xxxxxxxxxxxxx",
        "user": {
          "id": "xxxxxxxxxx",
          "name": "Woody",
          "profile": "https://cloudchat.gcdn.ntruss.com/samples/2.jpeg"
        },
        "unique_id": null,
        "type": "PUBLIC",
        "translation": false,
        "members": [],
        "disabled": false,
        "mutes": false,
        "push": false,
        "limit": 0,
        "link_url": null,
        "image_url": "https://cloudchat.gcdn.ntruss.com/samples/2.jpeg",
        "created_at": "2023-03-14T18:07:14+09:00",
        "updated_at": "2023-03-16T16:18:42+09:00"
      },
      {
        "id": "14f11d8e-a092-4274-a6ba-e2a8ce4d77fb",
        "project_id": "339c2b1c-d35b-47f2-828d-xxxxxxxxx",
        "name": "Channel-2",
        "user_id": "0e596be1-2ef0-4a79-a105-xxxxxxxxxxxxx",
        "user": {
          "id": "xxxxxxxxxx",
          "name": "Woody",
          "profile": "https://cloudchat.gcdn.ntruss.com/samples/2.jpeg"
        },
        "unique_id": null,
        "type": "PUBLIC",
        "translation": true,
        "members": [],
        "disabled": false,
        "mutes": false,
        "push": false,
        "limit": 0,
        "link_url": null,
        "image_url": "https://cloudchat.gcdn.ntruss.com/samples/1.jpeg",
        "created_at": "2023-03-08T07:09:26+09:00",
        "updated_at": "2023-03-16T08:19:02+09:00"
      }
    ]
    
    

    Responses

    Returned as HTTP status codes in the response body.

    HTTP status codeResponse messageDescription
    200OKGeneral successful request
    400Bad RequestUsed for general request failure (usually used to respond to a request format that the server can't understand)
    500Internal Server Error- Response code for common server errors
    - 4XX error codes are used to represent client-side errors
    - 5XX error codes represent server-side errors

    Individual-view API

    You can view Individual channels.

    Request URL

    GET https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels/:channelId
    

    Request headers

    HeaderDescription
    x-project-id- Dashboard > Settings > Project settings > Project ID
    x-api-key- Dashboard > Settings > Project settings > API Key

    Request path parameters

    ParameterTypeRequiredDescription
    channelIdStringYChannel ID

    Request examples

    curl -X 'GET' \
      'https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels/:channelId' \
      -H 'accept: application/json' \
      -H 'x-project-id: 339c2b1c-d35b-47f2-828d-xxxxxxxxx' \
      -H 'x-api-key: 4302925661f70ce7c14xxxxxxxxxxxxxxxxxxxx'
    
    

    Response examples (normal)

      {
        "id": "5498fee1-bfdf-4d50-8017-xxxxxxxxxxxxx",
        "project_id": "339c2b1c-d35b-47f2-828d-xxxxxxxxx",
        "name": "CLOVA GreenEye",
        "user_id": "0e596be1-2ef0-4a79-a105-xxxxxxxxxxxxx",
        "user": {
          "id": "xxxxxxxxxx",
          "name": "User",
          "profile": "https://cloudchat.gcdn.ntruss.com/samples/2.jpeg"
        },
        "unique_id": null,
        "type": "PUBLIC",
        "translation": false,
        "members": [],
        "disabled": false,
        "mutes": false,
        "push": false,
        "limit": 0,
        "link_url": null,
        "image_url": "https://cloudchat.gcdn.ntruss.com/samples/2.jpeg",
        "created_at": "2023-03-14T18:07:14+09:00",
        "updated_at": "2023-03-16T16:18:42+09:00"
      }
     
    

    Responses

    Returned as HTTP status codes in the response body.

    HTTP status codeResponse messageDescription
    200OKGeneral successful request
    400Bad RequestUsed for general request failure (usually used to respond to a request format that the server can't understand)
    500Internal Server Error- Response code for common server errors
    - 4XX error codes are used to represent client-side errors
    - 5XX error codes represent server-side errors

    Channel creation API

    Channels can be created.

    Request URL

    POST https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels
    

    Request headers

    HeaderDescription
    x-project-id- Dashboard > Settings > Project settings > Project ID
    x-api-key- Dashboard > Settings > Project settings > API Key

    Request body parameters

    ParameterTypeRequiredDescription
    nameStringYChannel name (Max: 90 bytes)
    typeStringYChannel type (PUBLIC, PRIVATE)
    translationBooleanNAutomatic translation (True/False)
    membersObjectNList of IDs that can join when the channel type is PRIVATE
    disabledBooleanNUse channel (True/False)
    mutesBooleanNChannel mute (True/False)
    pushBooleanNPush channel (True/False)
    limitIntegerNLimitation on number of channel users (0: unlimited)
    linkUrlStringNChannel link URL
    imageUrlStringNChannel image URL
    uniqueIdStringNUnique ID that can be arbitrarily specified
    Reference

    linkUrl rule defined

    1. Not allowed if only the domain is provided.
    2. Return status should be set to 200 in the target server.
    3. A header value should be provided.
    4. A content-type must be provided.

    imageUrl

    1. Not allowed if only the domain is provided.
    2. Return status should be set to 200 in the target server.
    3. A header value should be provided.
    4. A content-type must be provided and returned as image type.

    Example:

    https://www.gitbook.com/cdn-cgi/image/width=40,dpr=2,height=40,fit=contain,format=auto/https://2238982255-files.gitbook.io/ ~ /files/v0/b/gitbook-legacy-files/o/spaces%2F-LNAM8Kjj1jpQoidHTej%2Favatar-1592576907682.png?generation=1592576908144636&alt=media

    Request examples

    curl -X 'POST' \
      'https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels' \
      -H 'accept: application/json' \
       -H 'x-project-id: 339c2b1c-d35b-47f2-828d-xxxxxxxxx' \
      -H 'x-api-key: 4302925661f70ce7c14xxxxxxxxxxxxxxxxxxxx' \
      -H 'Content-Type: application/json' \
      -d '{
      "name": "Name",
      "uniqueId": "unique Id",
      "type": "PUBLIC",
      "translation": true,
      "members": [],
      "disabled": false,
      "mutes": false,
      "push": false,
      "limit": 20,
      "linkUrl": "http://link_url",
      "imageUrl": "http://image_url"
    }'
    
    

    Response examples (normal)

     {
      "channel": {
        "id": "464d7a5d-1074-47da-9e6c-xxxxxxxxx",
        "project_id": "339c2b1c-d35b-47f2-828d-xxxxxxxxx",
        "name": "Name",
        "user_id": "demo@itsb.io",
        "user": {
          "id": "TWVtYmVyczpkZW1vQGl0c2IuaW8=",
          "name": "User",
          "profile": "https://cloudchat.gcdn.ntruss.com/samples/2.jpeg"
        },
        "unique_id": "unique Id",
        "type": "PUBLIC",
        "translation": true,
        "members": [],
        "disabled": false,
        "mutes": false,
        "push": false,
        "limit": 0,
        "link_url": null,
        "image_url": null,
        "created_at": "2023-04-24T11:39:52+09:00",
        "updated_at": "2023-04-24T11:39:52+09:00"
      },
      "status": 1
    }
     
    

    Responses

    Returned as HTTP status codes in the response body.

    HTTP status codeResponse messageDescription
    200OKGeneral successful request
    400Bad RequestUsed for general request failure (usually used to respond to a request format that the server can't understand)
    500Internal Server Error- Response code for common server errors
    - 4XX error codes are used to represent client-side errors
    - 5XX error codes represent server-side errors

    Channel Edit API

    You can edit channel details.

    Request URL

    PUT https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels/:channelId
    

    Request headers

    HeaderDescription
    x-project-id- Dashboard > Settings > Project settings > Project ID
    x-api-key- Dashboard > Settings > Project settings > API Key

    Request path parameters

    ParameterTypeRequiredDescription
    channelIdStringYChannel ID

    Request body parameters

    ParameterTypeRequiredDescription
    nameStringNChannel name
    typeStringNChannel type (PUBLIC, PRIVATE)
    translationBooleanNAutomatic translation (True/False)
    membersObjectNList of IDs that can join when the channel type is PRIVATE
    disabledBooleanNUse channel (True/False)
    mutesBooleanNChannel mute (True/False)
    pushBooleanNPush channel (True/False)
    limitIntegerNLimitation on number of channel users (0: unlimited)
    linkUrlStringNChannel link URL
    imageUrlStringNChannel image URL
    uniqueIdStringNUnique ID that can be arbitrarily specified
    Reference

    linkUrl rule defined

    1. Not allowed if only the domain is provided.
    2. Return status should be set to 200 in the target server.
    3. A header value should be provided.
    4. A content-type must be provided.

    imageUrl

    1. Not allowed if only the domain is provided.
    2. Return status should be set to 200 in the target server.
    3. A header value should be provided.
    4. A content-type must be provided and returned as image type.

    Example:

    https://www.gitbook.com/cdn-cgi/image/width=40,dpr=2,height=40,fit=contain,format=auto/https://2238982255-files.gitbook.io/ ~ /files/v0/b/gitbook-legacy-files/o/spaces%2F-LNAM8Kjj1jpQoidHTej%2Favatar-1592576907682.png?generation=1592576908144636&alt=media

    Request examples

    curl -X 'PUT' \
      'https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels/464d7a5d-1074-47da-9e6c-xxxxxxxxxxxxxx' \
      -H 'accept: */*' \
      -H 'x-project-id: 339c2b1c-d35b-47f2-828d-xxxxxxxxxxxxx' \
      -H 'x-api-key: 4302925661f70ce7c1406c59543f2546d261dxxxxxxxxxxxx' \
      -H 'Content-Type: application/json' \
      -d '{
      "name": "Name(Edit)",
      "uniqueId": "unique Id(Edit)",
      "type": "PUBLIC",
      "translation": true,
      "members": ["user001","user002"],
      "disabled": false,
      "mutes": false,
      "push": false,
      "limit": 20,
      "linkUrl": "http://link_url",
      "imageUrl": "http://image_url"
    }'
    
    

    Response examples (normal)

     {
      "channel": {
        "id": "464d7a5d-1074-47da-9e6c-xxxxxxxxxxxxxx",
        "project_id": "339c2b1c-d35b-47f2-828d-xxxxxxxxxxxxx",
        "name": "Name(Edit)",
        "user_id": "demo@itsb.io",
        "user": {
          "id": "TWVtYmVyczpkZW1vQGl0c2IuaW8=",
          "name": "User",
          "profile": "https://profile_image_url"
        },
        "unique_id": "unique Id(Edit)",
        "type": "PUBLIC",
        "translation": true,
        "members": [],
        "disabled": false,
        "mutes": false,
        "push": false,
        "limit": 0,
        "link_url": null,
        "image_url": null,
        "created_at": "2023-04-24T11:39:52+09:00",
        "updated_at": "2023-04-24T13:38:57+09:00"
      },
      "status": 1
    }
     
    

    Responses

    Returned as HTTP status codes in the response body.

    HTTP status codeResponse messageDescription
    200OKGeneral successful request
    400Bad RequestUsed for general request failure (usually used to respond to a request format that the server can't understand)
    500Internal Server Error- Response code for common server errors
    - 4XX error codes are used to represent client-side errors
    - 5XX error codes represent server-side errors

    Channel Deletion API

    Specify the distribution Delete.

    Request URL

    DELETE https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels/:channelId
    

    Request headers

    HeaderDescription
    x-project-id- Dashboard > Settings > Project settings > Project ID
    x-api-key- Dashboard > Settings > Project settings > API Key

    Request path parameters

    ParameterTypeRequiredDescription
    channelIdStringYChannel ID

    Request examples

    curl -X 'DELETE' \
      'https://dashboard-api.ncloudchat.naverncp.com/v1/api/channels/464d7a5d-1074-47da-9e6c-xxxxxxxxxxxxxx' \
      -H 'accept: */*' \
      -H 'x-project-id: 339c2b1c-d35b-47f2-828d-xxxxxxxxxxxxx' \
      -H 'x-api-key: 4302925661f70ce7c1406c59543f2546d261dxxxxxxxxxxxx'
    
    

    Response examples (normal)

     {
      "channel": {
        "id": "464d7a5d-1074-47da-9e6c-xxxxxxxxxxxxxx",
        "project_id": "339c2b1c-d35b-47f2-828d-xxxxxxxxxxxxx",
        "name": "Name(Edit)",
        "user_id": "demo@itsb.io",
        "user": {
          "id": "TWVtYmVyczpkZW1vQGl0c2IuaW8=",
          "name": "User",
          "profile": "https://profile_image_url"
        },
        "unique_id": "unique Id(Edit)",
        "type": "PUBLIC",
        "translation": true,
        "members": [],
        "disabled": false,
        "mutes": false,
        "push": false,
        "limit": 0,
        "link_url": null,
        "image_url": null,
        "created_at": "2023-04-24T11:39:52+09:00",
        "updated_at": "2023-04-24T13:38:57+09:00"
      },
      "status": 1
    }
     
    

    Responses

    Returned as HTTP status codes in the response body.

    HTTP status codeResponse messageDescription
    200OKGeneral successful request
    400Bad RequestUsed for general request failure (usually used to respond to a request format that the server can't understand)
    500Internal Server Error- Response code for common server errors
    - 4XX error codes are used to represent client-side errors
    - 5XX error codes represent server-side errors

    Was this article helpful?

    What's Next
    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.