OTP'yi Python ile doğrulayın
Daha önce Python ile oluşturulmuş bir OTP Simgesi (Bir Zamanlı Şifre) Veriffy
Python : API BELGELERİ
- Python ile grup oluştur
- Python ile grup alanı listesini al
- Python ile bir gruba alan ekleyin
- Python ile bir gruptan alan silme
- Gruptaki bir kişiyi silme
- Ülkeyi Python ile e grubuna atama
- Python ile grup irtibat listesini al
- Python ile bir gruba kişi ekleyin
- Bir grubun kişisini Python ile değiştirin
- Python ile bir grubun kişisini sil
- {Language} ile aktif sohbet kanallarının bir listesini alın
- {Language} ile sohbet yoluyla mesaj gönderin
- {Language} ile sohbet yoluyla bir dosya gönderin
- {Language} ile bir sohbette konuşmaların listesini alın
- {Language} ile bir sohbetten mesajların listesini alın
- {Language} ile bir sohbetten okunmamış mesajların bir listesini alın
OTP'yi Python ile doğrulayın
import urllib2
afilnet_class="otp"
afilnet_method="verifyotp"
afilnet_user="user"
afilnet_password="password"
afilnet_destination="34600000000"
afilnet_code="A73HF3I"
afilnet_output=""
# Create an URL request
sUrl = "https://www.afilnet.com/api/http/?class="+afilnet_class+"&method="+afilnet_method+"&user="+afilnet_user+"&password="+afilnet_password+"&destination="+afilnet_destination+"&code="+afilnet_code+"&output="+afilnet_output
result = urllib2.urlopen(sUrl).read()
from urllib.request import urlopen
from urllib.parse import urlencode
afilnet_class="otp"
afilnet_method="verifyotp"
afilnet_user="user"
afilnet_password="password"
afilnet_destination="34600000000"
afilnet_code="A73HF3I"
afilnet_output=""
# Create an URL request
sUrl = "https://www.afilnet.com/api/http/"
data = urlencode({"class": afilnet_class,"method": afilnet_method,"user": afilnet_user,"password": afilnet_password,"destination": afilnet_destination,"code": afilnet_code,"output": afilnet_output}).encode("utf-8")
result = urlopen(sUrl, data).read()
print(result)
import requests
afilnet_class="otp"
afilnet_method="verifyotp"
afilnet_user="user"
afilnet_password="password"
afilnet_destination="34600000000"
afilnet_code="A73HF3I"
afilnet_output=""
# Create an URL request
sUrl = "https://www.afilnet.com/api/basic/?class="+afilnet_class+"&method="+afilnet_method+"&destination="+afilnet_destination+"&code="+afilnet_code+"&output="+afilnet_output
result = requests.get(sUrl,auth=requests.auth.HTTPBasicAuth(afilnet_user,afilnet_password))
print(result.text)
Parametre | Açıklama | Zorunlu / Seçmeli |
---|---|---|
class=otp | İstenen sınıf: İsteğin yapıldığı sınıf | Zorunlu |
method=verifyotp | İstenen sınıf yöntemi: İsteğin yapıldığı sınıfın yöntemi | Zorunlu |
user | Afilnet hesabınızın kullanıcısı ve e-postası | Zorunlu |
password | Afilnet hesabınızın şifresi | Zorunlu |
destination | Cep telefonu numarası veya hedef e-posta | Zorunlu |
code | Doğrulamak için şifre | İsteğe bağlı |
output | Sonucun çıktı formatı | İsteğe bağlı |
İstek yaptığınızda aşağıdaki alanları alacaksınız:
- status
-
sonuç (eğer durum = başarı ise), aşağıdaki değerleri alacaksınız:
- Size başka hiçbir değer gönderilmeyecek
- hata (eğer durum = hata ise), burada hata kodunu alacaksınız
Muhtemel hata kodları aşağıda listelenmiştir.
kod | Açıklama |
---|---|
MISSING_USER | Kullanıcı veya e-posta dahil değil |
MISSING_PASSWORD | Şifre dahil değil |
MISSING_CLASS | Sınıf dahil değil |
MISSING_METHOD | Yöntem dahil değil |
MISSING_COMPULSORY_PARAM | Zorunlu parametre dahil değil |
INCORRECT_USER_PASSWORD | Yanlış kullanıcı veya şifre |
INCORRECT_CLASS | Yanlış sınıf |
INCORRECT_METHOD | Yanlış yöntem |
CODE_NOT_FOUND | ERROR_CODE_NOT_FOUND |
Parametreler:
- class : otp
- method : verifyotp
- user : user
- password : password
- destination : 34600000000
- code : A73HF3I
- output :
İstek:
https://www.afilnet.com/api/http/?class=otp&method=verifyotp&user=user&password=password&destination=34600000000&code=A73HF3I&output=