如何使用Python读取5sim.net的消息?

问题描述 投票:0回答:1

我可以使用Python从5sim.net获取数字。但我不知道如何读取我得到的号码的代码。我在文档中找不到它。如何从号码中读取代码?

import requests

token = 'Your token'
country = 'bangladesh'
operator = 'any'
product = 'telegram'

headers = {
    'Authorization': 'Bearer ' + token,
    'Accept': 'application/json',
}

response = requests.get('https://5sim.net/v1/user/buy/activation/' + country + '/' + operator + '/' + product, headers=headers)

这就是我获取号码的方式

python api python-requests
1个回答
0
投票

您将从

https://5sim.net/v1/user/buy/activation/
获取订单 ID,然后使用
https://5sim.net/v1/user/check/ORDER_ID_HERE
获取短信(如果已发送)。

orderCheckResp = requests.get(
    url='{}/{}'.format('https://5sim.net/v1/user/check', response['5347809455']),
    headers=headers
)
© www.soinside.com 2019 - 2024. All rights reserved.