Skip to content
This repository was archived by the owner on Oct 29, 2023. It is now read-only.

Commit c22a84f

Browse files
authored
Append trailing slash (#82)
1 parent a85c028 commit c22a84f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

n26/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def _initiate_authentication_flow(username: str, password: str) -> str:
392392
"password": password
393393
}
394394
# TODO: Seems like the user-agent is not necessary but might be a good idea anyway
395-
response = requests.post(BASE_URL_GLOBAL + "/oauth/token", data=values_token, headers=BASIC_AUTH_HEADERS)
395+
response = requests.post(BASE_URL_GLOBAL + "/oauth/token/", data=values_token, headers=BASIC_AUTH_HEADERS)
396396
if response.status_code != 403:
397397
raise ValueError("Unexpected response for initial auth request: {}".format(response.text))
398398

@@ -415,7 +415,7 @@ def _refresh_token(refresh_token: str):
415415
'refresh_token': refresh_token,
416416
}
417417

418-
response = requests.post(BASE_URL_GLOBAL + '/oauth/token', data=values_token, headers=BASIC_AUTH_HEADERS)
418+
response = requests.post(BASE_URL_GLOBAL + '/oauth/token/', data=values_token, headers=BASIC_AUTH_HEADERS)
419419
response.raise_for_status()
420420
return response.json()
421421

@@ -455,7 +455,7 @@ def _complete_authentication_flow(self, mfa_token: str) -> dict:
455455
else:
456456
mfa_response_data['grant_type'] = "mfa_oob"
457457

458-
response = requests.post(BASE_URL_DE + "/oauth/token", data=mfa_response_data, headers=BASIC_AUTH_HEADERS)
458+
response = requests.post(BASE_URL_DE + "/oauth/token/", data=mfa_response_data, headers=BASIC_AUTH_HEADERS)
459459
response.raise_for_status()
460460
tokens = response.json()
461461
return tokens

0 commit comments

Comments
 (0)