2.1 KiB
2.1 KiB
Get Webhook
Purpose of the GET Webhook API
Use this API to get a user's Webhook.
Endpoint
Authentication: required
GET /webhook/:id/view.json
Parameters
None
Examples
Command Line (using openphoto-php)
source secrets.sh
./openphoto -p -h current.openphoto.me -e /webhook/abcdefghijklmnopqrstuvwxyz/view.json
PHP (using openphoto-php)
$client = new OpenPhotoOAuth($host, $consumerKey, $consumerSecret, $oauthToken, $oauthTokenSecret);
$response = $client->get("/webhook/abcdefghijklmnopqrstuvwxyz/view.json");
Response
The response is in a standard response envelope.
- message, A string describing the result. Don't use this for anything but reading.
- code, 200 on success
- result, A Webhook object
Sample
{
"message" : "Your group",
"code" : 200,
"result" : {
id: "abcdefghijklmnopqrstuvwxyz",
appId: "current.openphoto.me",
callback: "http://somehost.com/somepath",
topic: "photo.upload",
verifyToken: "qazwsxedcrfvz",
challenge: "plmoknijbuhv",
secret: "rfvtgbyhn"
}
}