# Retrieve a comment

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


Retrieve a comment for an entity identified by comment ID.

## Sample Request

#### cURL

```bash
curl  https://{site}.chargebee.com/api/v2/comments/cmt___test__KyVnHhSBWm77N2sQ \
     -u {site_api_key}:
```

#### .NET

```dotnet
using ChargeBee.Api;
using ChargeBee.Models;

ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = Comment.Retrieve("cmt___test__KyVnHhSBWm77N2sQ").Request();

Comment comment = result.Comment;
```

#### Go

```go
package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    commentAction "github.com/chargebee/chargebee-go/v3/actions/comment"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := commentAction.Retrieve("cmt___test__KyVnHhSBWm77N2sQ").Request()
    if err != nil {
        fmt.Println(err)
    } else {
        Comment := res.Comment
    }
}
```

#### Go

```go
package main

import (
  "fmt"
  "github.com/chargebee/chargebee-go/v4"
)

func main() {
  config := &chargebee.ClientConfig{
    SiteName: "{site}",
    ApiKey: "{site_api_key}",
  }    
  client := chargebee.NewClient(config)
  req := &chargebee.CommentRetrieveRequest{
    Id : "cmt___test__KyVnHhSBWm77N2sQ",
}
  res, err := client.Comment.Retrieve(req)
      if err != nil {
        fmt.Println(err)
    } else {
        Comment := res.Comment
    }
}
```

#### Java

```java
import com.chargebee.*;
import com.chargebee.ListResult;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
import java.io.IOException;

public class Sample {

    public static void main(String args[]) throws IOException, Exception {
        Environment.configure("{site}", "{site_api_key}");
        Result result = Comment.retrieve("cmt___test__KyVnHhSBWm77N2sQ").request();

        Comment comment = result.comment();
    }
}
```

#### Java

```java
import com.chargebee.v4.client.ChargebeeClient;
import com.chargebee.v4.models.comment.Comment;
import com.chargebee.v4.models.comment.params.CommentRetrieveParams;
import com.chargebee.v4.models.comment.responses.CommentRetrieveResponse;

public class CommentRetrieve {

    public static void main(String[] args) {
        ChargebeeClient client = ChargebeeClient.builder()
            .apiKey("{site_api_key}")
            .siteName("{site}")
            .build();

        CommentRetrieveResponse response = client.comments().retrieve("cmt___test__KyVnHhSBWm77N2sQ");

        Comment comment = response.getComment();
    }
}
```

#### Node.js

```node
import Chargebee from "chargebee";

const chargebee = new Chargebee({
    site: "{site}",
    apiKey: "{site_api_key}",
});

try {
    const result = await chargebee.comment.retrieve("cmt___test__KyVnHhSBWm77N2sQ");

    console.log(result);
    const comment = result.comment;
} catch (err) {
    console.log(err);
}
```

#### PHP

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use Chargebee\ChargebeeClient;

$chargebee = new ChargebeeClient(options: [
    "site" => "{site}",
    "apiKey" => "{site_api_key}",
]);
$result = $chargebee->comment()->retrieve("cmt___test__KyVnHhSBWm77N2sQ");
$comment = $result->comment;
```

#### Python

```python
from chargebee import Chargebee

cb_client = Chargebee(api_key="{site_api_key}", site="{site}")
response = cb_client.Comment.retrieve("cmt___test__KyVnHhSBWm77N2sQ")
comment = response.comment
```

#### Ruby

```ruby
require 'chargebee'

ChargeBee.configure(:site => "{site}",
  :api_key => "{site_api_key}")

result = ChargeBee::Comment.retrieve("cmt___test__KyVnHhSBWm77N2sQ")

comment = result.comment
```

## Sample Response

```json
{
  "comment": {
    "added_by": "full_access_key_v1",
    "created_at": 1517505967,
    "entity_id": "__test__KyVnHhSBWm74Q2sK",
    "entity_type": "subscription",
    "id": "cmt___test__KyVnHhSBWm77N2sQ",
    "notes": "This is a no cost plan",
    "object": "comment",
    "type": "user"
  }
}
```

## URL Format

**GET** https://[site].chargebee.com/api/v2/comments/{comment-id}

## Returns

- `comment` (Comment object)
  Resource object representing comment
