diff --git a/common/api/__init__.py b/common/api/__init__.py index f07fc1a081..5b1d66cf77 100644 --- a/common/api/__init__.py +++ b/common/api/__init__.py @@ -43,4 +43,4 @@ def api_get(endpoint, method='GET', timeout=None, access_token=None, **params): headers['User-Agent'] = "openpilot-" + version - return requests.request(method, API_HOST+endpoint, timeout=timeout, headers=headers, params=params) + return requests.request(method, API_HOST + "/" + endpoint, timeout=timeout, headers=headers, params=params) diff --git a/selfdrive/athena/registration.py b/selfdrive/athena/registration.py index a221981526..39dfb3c239 100755 --- a/selfdrive/athena/registration.py +++ b/selfdrive/athena/registration.py @@ -72,7 +72,7 @@ def register(show_spinner=False) -> str: try: register_token = jwt.encode({'register': True, 'exp': datetime.utcnow() + timedelta(hours=1)}, private_key, algorithm='RS256') cloudlog.info("getting pilotauth") - resp = api_get("/v2/pilotauth/", method='POST', timeout=15, + resp = api_get("v2/pilotauth/", method='POST', timeout=15, imei=imei1, imei2=imei2, serial=serial, public_key=public_key, register_token=register_token) if resp.status_code in (402, 403):