POST
https://api.cryptohopper.com/v1/social/post/{id}/comment
Adds a comment to a post. The response contains the parent post with the new comment in item, so you can refresh the thread from one call.
OAuth scope:
manage About scopes
Accepts the same message, media, video and location fields as Create a social post. You can comment at most once every 10 seconds, and once every 20 seconds on the same post.
Example request
curl -X POST "https://api.cryptohopper.com/v1/social/post/POST_ID/comment" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"message":"Same here, waiting for a breakout"}'
const response = await fetch('https://api.cryptohopper.com/v1/social/post/POST_ID/comment', {
method: 'POST',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"message": "Same here, waiting for a breakout"
})
});
const data = await response.json();
import requests
response = requests.post(
"https://api.cryptohopper.com/v1/social/post/POST_ID/comment",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"message": "Same here, waiting for a breakout"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/social/post/POST_ID/comment');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'message' => 'Same here, waiting for a breakout',
]),
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Required | The OAuth access token of the user. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | Required | Numeric ID of the post to comment on. |
Response
{
"data": {
"id": "123456",
"profile_id": "4567",
"location": "NL",
"message": "Watching BTC closely today #bitcoin",
"media_url": "",
"created": 1790316000,
"updated": 1790316000,
"private_message": "0",
"profile_alias": "trader-jane",
"profile_image": "https://cdn.example.com/images/social/uploads/avatar_4567.jpg",
"profile_name": "Trader Jane",
"verified": "0",
"total_likes": "12",
"total_comments": "3",
"total_reposts": "1",
"liked": 0,
"commented": 0,
"reposted": 0,
"profile_link": "/social/profile/trader-jane",
"following": 0,
"status": 1,
"item": {
"id": "778899",
"post_id": "123456",
"profile_id": "5678",
"location": "",
"message": "Same here, waiting for a breakout",
"media_url": "",
"created": 1790317800,
"updated": 1790317800,
"private_message": "0",
"profile_alias": "hodl-henk",
"profile_image": "https://cdn.example.com/images/social/uploads/avatar_4567.jpg",
"profile_name": "Hodl Henk",
"verified": "0",
"total_likes": "2",
"liked": 0,
"profile_link": "/social/profile/hodl-henk",
"reposted": 0,
"commented": 0,
"following": 0
}
}
}