POST
https://api.cryptohopper.com/v1/user/askai/vote
Rates an Ask AI answer. The vote value is added to the answer's satisfaction score, so send 1 for a helpful answer and -1 for an unhelpful one.
OAuth scope:
read user About scopes
Example request
curl -X POST "https://api.cryptohopper.com/v1/user/askai/vote" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"vote_id":98765,"vote":1}'
const response = await fetch('https://api.cryptohopper.com/v1/user/askai/vote', {
method: 'POST',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"vote_id": 98765,
"vote": 1
})
});
const data = await response.json();
import requests
response = requests.post(
"https://api.cryptohopper.com/v1/user/askai/vote",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"vote_id": 98765,
"vote": 1
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/user/askai/vote');
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([
'vote_id' => 98765,
'vote' => 1,
]),
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Required | The OAuth access token of the user. |
Response
{
"data": "Vote saved."
}