Answer a provider's GET verification
Some providers verify a webhook URL with a GET before they send events: Meta sends `hub.mode`, `hub.verify_token` and `hub.challenge`, Dropbox sends `challenge`. A webhook trigger with `challenge` set answers that request: when the `token_param` query parameter equals the verify token (the `api_key` of the trigger's `token_connection`, read from the vault), or when the trigger sets no token, the value of the `param` query parameter comes back as text/plain with `200`. It starts no run, also while the routine is paused. A missing or wrong token, or a trigger without `challenge`, answers 401 `webhook_signature_invalid`; a challenge value that is not 1-1024 characters of `A-Z a-z 0-9 . _ ~ : + / = -` answers 400; a vault that cannot be reached answers 503. Events still arrive as POSTs to the same URL and are verified with the trigger's `verify` scheme. The hook is looked up first, as for deliveries: an unknown ID answers 404 `hook_not_found`, and every other answer carries `x-b3os-hook-known: 1`.
/v1/routines/hooks/{hook_id}
Path Parameters
hook_id
string
required
path
"hk_01m5t3r2qwz23751t0x74bhahz"Query Parameters
params
object
optional
query
{"hub.mode":"subscribe","hub.verify_token":"7d1f0c2a9b8e4f63a5d2c1b0e9f8a7d6","hub.challenge":"1158201444"}Responses
text/plaincurl -X GET 'https://beta-api.b3os.org/v1/routines/hooks/hk_01m5t3r2qwz23751t0x74bhahz' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/v1/routines/hooks/hk_01m5t3r2qwz23751t0x74bhahz', { method: 'GET', headers: { "Authorization": "Bearer YOUR_API_TOKEN" }});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://beta-api.b3os.org/v1/routines/hooks/hk_01m5t3r2qwz23751t0x74bhahz', headers=headers)print(response.json())
"1158201444"
Try this endpoint
/v1/routines/hooks/{hook_id}