Answer the question
In order to leave comments, you need to log in
How to receive/send messages on behalf of a group?
Installed the ok_api library.
Created a group, created an application, added an application to the group.
The essence of the task is in the header, for a start I decided to run a simple example.
from ok_api import OkApi
def main():
"""
Простой запрос на примере метода friends.get с
необязательным параметром типа сортировки
(https://apiok.ru/dev/methods/rest/friends/friends.get)
"""
ok = OkApi(access_token='OK_ACCESS_TOKEN',
application_key='OK_APP_PUBLIC_TOKEN',
application_secret_key='OK_APP_PRIVATE_TOKEN')
response = ok.friends.get(sort_type='PRESENT')
print(response.json())
if __name__ == '__main__':
main()
{'error_code': 100, 'error_msg': 'PARAM : Parameter access_token specified but application is not EXTERNAL', 'error_data': None}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question