Skip to content

Commit 5abed2e

Browse files
committed
VkApi.api_login: raise error when trying to login without cookies
1 parent 6eaf033 commit 5abed2e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

vk_api/vk_api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ def check_sid(self):
221221
def api_login(self):
222222
""" Получение токена через Desktop приложение """
223223

224+
if not self.sid:
225+
raise AuthorizationError('API authorization error (no sid cookie)')
226+
224227
url = 'https://oauth.vk.com/authorize'
225228
values = {
226229
'client_id': self.app_id,

0 commit comments

Comments
 (0)