Skip to content

Refresh token doesn't work #10

Description

@li7vinov-denis
Exception has occurred: ValueError
Failed to refresh auth data: {'error_description': 'Invalid grant_type parameters', 'error': 'invalid_grant'}
KeyError: 'refresh_token'

The above exception was the direct cause of the following exception:

  File "/Users/_/Documents/Projects/py/boosty/main.py", line 22, in loginAsync
    token = await auth.refresh_auth_data(session=api.http_client, api_url=API_URL)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/_/Documents/Projects/py/boosty/main.py", line 31, in main
    asyncio.run(loginAsync())
  File "/Users/_/Documents/Projects/py/boosty/main.py", line 34, in <module>
    main()
ValueError: Failed to refresh auth data: {'error_description': 'Invalid grant_type parameters', 'error': 'invalid_grant'}

login method:

async def loginAsync():
    
    auth = Auth(auth_data=auth_data)
    
    api = API(auth=auth)
    
    await auth.refresh_auth_data(session=api.http_client, api_url=API_URL)
    
    response = await api.get_post("boosty", post_id="c9fb8a19-c45e-4602-9942-087c3af28c1b")
    
    print(response.title)

Do you need some additional details to figure out issue?

I tried to send request directly in Postman - received that response:

{
    "error_description": "Invalid parameters: device_os, refresh_token, device_id, grant_type",
    "error": "invalid_param"
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions