jcgoette / baby_buddy_homeassistant

This custom integration provides sensors for Baby Buddy API endpoints.
MIT License
59 stars 26 forks source link

Help to understand issue 403, message='Forbidden' #107

Closed tomamplius closed 1 year ago

tomamplius commented 1 year ago

with V2.6.7 i have this error on Homeassitant

2023-04-27T23:49:22.483782+02:00 homeassistant hass[32146]: 2023-04-27 23:49:22.482 ERROR (MainThread) [custom_components.babybuddy] Authentication failed while fetching babybuddy data: 403, message='Forbidden', url=URL('https://baby.domaine.com/api/children/')

but on same host it's work with curl

curl -X GET 'https://baby.domaine.com/api/children/'  -H 'Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
{"count":1,"next":null,"previous":null,"results":[{"id":1,"first_name":"n v a","last_name":"l","birth_date":"2023-03-13","slug":"n-v-a-l","picture":null}]}

can you help me to understand, my issue?

tomamplius commented 1 year ago

I have add bellow parameter on babybuddy configuration


SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")