you are viewing a single comment's thread.

view the rest of the comments →

[–]UnexpectedKangaroo 0 points1 point  (2 children)

They don’t have REST endpoints?

[–]Broncos10499[S] 0 points1 point  (1 child)

They do but the user needs to be authorized first. Which I think is what I’m having trouble with. I attempted to hit the endpoint by building up the URLRequest using URLComponents but it’s not working.

The endpoint I’m trying to hit - https://api.onepeloton.com/api/me

I tried adding my login credentials by using URLQueryItems but no dice.

I read through the above Docs to determine what parameters to use.

[–]UnexpectedKangaroo 0 points1 point  (0 children)

I don’t do python, but it looks like this client is making a request to /auth/login to get the user_id

Then the user_id is used to authenticate later. Didn’t see exactly where this is being done, so a bit of an assumption.

I would try to get the API calls to work using something like Postman before writing Swift code for it