Delete Specific Slotify App
This endpoint will be used to delete specific app for given user.
Authentication
Use owner token for this endpoint.
Method | DELETE |
---|---|
Endpoint | v1/apps/:uuid |
Headers | Accept: application/json |
Authorization: Bearer <owner_token> | |
Token Type | Owner |
Example Request:
Following code shows how to send request to delete specific app in Slotify api.
- PHP
- CURL
$endpoint = 'https://api.slotify.ca/v1/apps/' . $uuid;
$owner_token = base64_encode('email:token');
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $endpoint,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer ' . $owner_token,
'Accept: application/json'
),
));
$response = curl_exec($curl);
if(curl_errno($curl)) {
echo 'Error: ' . curl_error($curl);
} else {
$decoded_response = json_decode($response, true);
if(isset($decoded_response['message'])) {
echo 'App deleted successfully: ' . $decoded_response['message'];
} else {
echo 'Failed to delete app.';
}
}
curl -X DELETE \
https://api.slotify.ca/v1/apps/:uuid \
-H 'Authorization: Bearer ' \
-H 'Accept: application/json'
Example Response:
Following response will be provided by Slotify server when this endpoint is called:
- 204 No Content