diff --git a/vehicle/bluelink.go b/vehicle/bluelink.go index a68f9d989..0b4850fe2 100644 --- a/vehicle/bluelink.go +++ b/vehicle/bluelink.go @@ -31,6 +31,7 @@ func NewHyundaiFromConfig(other map[string]interface{}) (api.Vehicle, error) { CCSPApplicationID: bluelink.HyundaiAppID, AuthClientID: "64621b96-0f0d-11ec-82a8-0242ac130003", BrandAuthUrl: "https://eu-account.hyundai.com/auth/realms/euhyundaiidm/protocol/openid-connect/auth?client_id=%s&scope=openid%%20profile%%20email%%20phone&response_type=code&hkid_session_reset=true&redirect_uri=%s/api/v1/user/integration/redirect/login&ui_locales=%s&state=%s:%s", + PushType: "GCM", } return newBluelinkFromConfig("hyundai", other, settings) @@ -45,6 +46,7 @@ func NewKiaFromConfig(other map[string]interface{}) (api.Vehicle, error) { CCSPApplicationID: bluelink.KiaAppID, AuthClientID: "572e0304-5f8d-4b4c-9dd5-41aa84eed160", BrandAuthUrl: "https://eu-account.kia.com/auth/realms/eukiaidm/protocol/openid-connect/auth?client_id=%s&scope=openid%%20profile%%20email%%20phone&response_type=code&hkid_session_reset=true&redirect_uri=%s/api/v1/user/integration/redirect/login&ui_locales=%s&state=%s:%s", + PushType: "APNS", } return newBluelinkFromConfig("kia", other, settings) diff --git a/vehicle/bluelink/identity.go b/vehicle/bluelink/identity.go index f3423253f..b3653bfea 100644 --- a/vehicle/bluelink/identity.go +++ b/vehicle/bluelink/identity.go @@ -36,6 +36,7 @@ type Config struct { BasicToken string CCSPServiceID string CCSPApplicationID string + PushType string } // Identity implements the Kia/Hyundai bluelink identity. @@ -68,7 +69,7 @@ func (v *Identity) getDeviceID() (string, error) { uuid := uuid.NewString() data := map[string]interface{}{ "pushRegId": lo.RandomString(64, []rune("0123456789ABCDEF")), - "pushType": "APNS", + "pushType": v.config.PushType, "uuid": uuid, }