Premier League Live Scores

ÜCRETSİZ PREMIUM
Taraf Simone | Güncelleyen 7 days ago | Sports
Popülerlik

9 / 10

Gecikme

420ms

Hizmet Düzeyi

100%

Health Check

N/A

Tüm Tartışmalara Dön

Webhooks help

Rapid account: Afaiq Hack
afaiq.hack
3 years ago

Hello,

Im trying to get live goals via webhooks for this API, but I´m having trouble with it, as I dont understand how it would work at all.

Could anybody help me?

Best regards,

Rapid account: Afaiq Hack
afaiq.hack Commented 3 years ago

Im assuming i have to call the /subsribe endpoint with the post request, to be able to get a token, to active my webhook, yes?

this is the call im doing below. Pretty much copy pasted the code from the example, but filling in the query string values.

import requests

url = “https://heisenbug-premier-league-live-scores-v1.p.rapidapi.com/api/premierleague/push/subscribe

querystring = {“team1”:"brighton ",“team2”:“arsenal”,“url”:‘http://127.0.0.1:5000/webhook’}

headers = {
‘x-rapidapi-key’: key,
‘x-rapidapi-host’: “heisenbug-premier-league-live-scores-v1.p.rapidapi.com
}

response = requests.request(“POST”, url, headers=headers, params=querystring)
print(response)
print(response.text)

Problem is, I keep getting this error:
HTTP Status 405 - HTTP method POST is not supported by this URL

this means that this endpoint - https://heisenbug-premier-league-live-scores-v1.p.rapidapi.com/api/premierleague/push/subscribe
does not support push requests?

Or am I doing something wrong in my code. Some help/feedback would be greatly appreciated!

Aşağıya yorum ekleyerek tartışmaya katılın:

Yeni yorumlar göndermek için giriş yapın / kaydolun