PATCH
https://api.cryptohopper.com/v1/hopper/receivingmobilenotifications
Turns push notifications on or off for one mobile device of the user.
OAuth scope:
manage About scopes
Example request
curl -X PATCH "https://api.cryptohopper.com/v1/hopper/receivingmobilenotifications?player_id=PLAYER_ID" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/hopper/receivingmobilenotifications?player_id=PLAYER_ID', {
method: 'PATCH',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.patch(
"https://api.cryptohopper.com/v1/hopper/receivingmobilenotifications",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
params={
"player_id": "PLAYER_ID"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/receivingmobilenotifications?player_id=PLAYER_ID');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
],
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Optional | The OAuth access token of the user. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
player_id |
string | Required | Push notification player ID of the device. |
type |
string | Optional | Send logout to stop notifications for this device; any other value turns them on. |
Response
{
"data": "Receiving mobile notifications has been updated."
}