bvanelli / actualpy

Python API implementation for Actual server - reference https://actualbudget.org/
20 stars 4 forks source link

Logging in using header method #43

Closed bobokun closed 1 month ago

bobokun commented 1 month ago

Description

I'm having trouble when authenticating with HTTP Headers . I've tried passing token instead of password but I think it's not passing the correct header.

Error logs:

2024-07-18 17:21:00,807 - ERROR - Failed to backup ActualBudget: 2 validation errors for LoginDTO
status
  Input should be 'ok' [type=enum, input_value='error', input_type=str]
    For further information visit https://errors.pydantic.dev/2.8/v/enum
data
  Field required [type=missing, input_value={'status': 'error', 'reason': 'invalid-header'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.8/v/missing
bvanelli commented 1 month ago

Ah, I did not know they supported this, I quickly implemented it in https://github.com/bvanelli/actualpy/pull/44

bobokun commented 1 month ago

Thanks! Tested using pip install git+https://github.com/bvanelli/actualpy.git@43-header-login and it seems to be working!