Y
Y
y_o_l_k_i_n___e_g_o_r2021-05-06 20:21:27
Python
y_o_l_k_i_n___e_g_o_r, 2021-05-06 20:21:27

Auth.forbidden QIWI. What to do?

Code:

s = requests.Session()
s.headers['authorization'] = 'Bearer ' + QIWI_TOKEN     # токен
parameters = {'rows': 1,}                       #   QIWI ACCOUNT - номер телефона
h = s.get('https://edge.qiwi.com/payment-history/v2/persons/' + QIWI_ACCOUNT + '/payments', params=parameters)
return h.json()

error:
{'serviceName': 'payment-history', 'errorCode': 'auth.forbidden', 'description': 'Access denied', 'userMessage': 'Access denied', 'dateTime': 'date', 'traceId': '68c2...d95f7'}


Why access error?
The same working code is written in QIWI api, but it does not work for me.
If something needs to be done with the qiwi account, write what.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-05-06
@SoreMix

What permissions does the API key have? Most likely they did not give out the necessary ones at release

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question