Pythe1337N / garmin-connect

Makes it simple to interface with Garmin Connect to get or set any data point.
MIT License
144 stars 58 forks source link

HTTP 500 IllegalStateException on /group-service/keyword requests #51

Open wscourge opened 1 year ago

wscourge commented 1 year ago

Hi, I'm trying to add searching groups to the package. The endpoint is:

POST https://connect.garmin.com/modern/proxy/group-service/keyword

with the following payload:

{
  "keyword": "what-are-you-looking-for",
  "start": 1,
  "limit": 16
}

but when I try sending the request as follows:

import { GarminConnect } from "garmin-connect"

const credentials = {
  username: "",
  password: "",
}
const GCClient = new GarminConnect(credentials)
await GCClient.login("", "")

// NOTE: below is groups search
const keyword = "name"
const groupsSearchURL = "https://connect.garmin.com/modern/proxy/group-service/keyword"
const groups = await GCClient.post(groupsSearchURL, { keyword, start: 1, limit: 16 })

it returns HTTP 500 on the Garmin side: image

The functionality does work in Garmin Connect when you go here: https://connect.garmin.com/modern/groups.

image image image

Any idea how to address this?