Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

400 Forbidden Error when fetching last 24h data #4

Closed
Pourbaix opened this issue May 24, 2023 · 5 comments
Closed

400 Forbidden Error when fetching last 24h data #4

Pourbaix opened this issue May 24, 2023 · 5 comments

Comments

@Pourbaix
Copy link

Pourbaix commented May 24, 2023

Hello ondrej,
I'm using this implementation since a few months now and it worked perfectly until this morning.
I can not manage to recover data from the API anymore and it gives me a 400 "Forbidden" error message.

After some research, it looks like the connection process is fine and that the error comes from this route: "https://clcloud.minimed.eu/connect/carepartner/v6/display/message"
Right now, we make a POST request to this route providing the auth token and a url-encoded form containing the username and the role but it seems like they have changed something with their API and that it needs something new.

So i was wondering if someone out there has the same problem and how can we find a solution for this ?

@hhuitema
Copy link

Something has changed on Carelink.. Using the app i can now follow multiple people.
So i guess on the technical side some url's and XML messages have changed.

This might be a big problem to fix.

@ondrej1024
Copy link
Owner

This started happening to me as well yesterday. Surely it is caused by an API change on the Carelink side.
The issue is being discussed here. I don't think there is a solution yet.

@Pourbaix
Copy link
Author

Pourbaix commented May 24, 2023

Ok it works now !
Just by adding the patient username to the body of the POST request it works again:
image
Replace "yourpatientusername" with the username of the patient you want data of.
NOTE: Im currently using a care partner account so I dont now if it works for other types of account.

@ondrej1024
Copy link
Owner

I can confirm that adding the "patientId" to the data request works. So as a quick fix we might consider just adding a new parameter to the carelink_client_cli.py program where the patient Id can be specified, which is then passed on to the library.

However, a complete solution might be a bit more complex. In the xDripCareLinkFollower I see a lot of pull requests which implement the "Multi follow" feature. These would need to be ported to the carelink-python-client.

@Pourbaix
Copy link
Author

If you want to implement the 'multi-follow' feature, I think in the issue you gave me previously they talk about a route (supposedly https://carelink.minimed.eu/patient/m2m/links/patients) that recovers all the linked patients for a given partner account.
Depending on what you want to achieve, you could loop trough those usernames and make a request for each one.

Anyway, thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants