You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Putting this out there in case other people come across this issue.
Problem
The current documentation for EU and Enterprise customers is incorrect:
For SparkPost EU and Enterprise accounts, pass in a second parameter to set the API host.
fromsparkpostimportSparkPostsp=SparkPost('YOUR API KEY', 'https://api.eu.sparkpost.com')
This causes a resolver error:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='https', port=443): Max retries exceeded with url: //api.eu.sparkpost.com/api/v1/transmissions (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe226f75630>: Failed to establish a new connection: [Errno -2] Name or service not known'))
Cause
When the second parameter is passed, the constructor appends "https://" to the string (assuming that a domain will be passed and NOT the base URL). This causes the resultant URL to be https://https://api.eu.sparkpost.com/api/v1/transmissions, which causes connectivity failure.
Solution
When passing the API host, drop the https://. Working example:
fromsparkpostimportSparkPostsp=SparkPost('YOUR API KEY', 'api.eu.sparkpost.com')
The text was updated successfully, but these errors were encountered:
Putting this out there in case other people come across this issue.
Problem
The current documentation for EU and Enterprise customers is incorrect:
This causes a resolver error:
Cause
When the second parameter is passed, the constructor appends "https://" to the string (assuming that a domain will be passed and NOT the base URL). This causes the resultant URL to be
https://https://api.eu.sparkpost.com/api/v1/transmissions
, which causes connectivity failure.Solution
When passing the API host, drop the
https://
. Working example:The text was updated successfully, but these errors were encountered: