N
N
Nikita Kargin2020-05-15 23:06:07
Python
Nikita Kargin, 2020-05-15 23:06:07

Why is the user's settings for working with the etxt API incorrect?

I'm trying to simplify the work on this exchange, but I get the error 'here_was_my_login User settings for working with the API are not correct'
Here is my python code:

import requests
import hashlib
import time
def md5(string):
    m = hashlib.md5()
    m.update(string.encode('utf-8'))
    return m.hexdigest()
tm = time.time()
url = 'https://www.etxt.ru/api/json/'
params1='from='+str(tm-900)
api_pass='тут_был_мой_api_pass'
sign = md5(params1 + md5(api_pass + 'api-pass'))
token='тут_был_мой_токен'
response = requests.get(url,
                        params={'method':'messages.getList','sign':sign,'token':token})

Didn't work much with requests, so I could make trivial mistakes

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question