-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Labels
docs enhancementshould update the documentation to better explain thisshould update the documentation to better explain this
Description
Hi there,
Let's say I want to use the example from https://github.com/opsgenie/opsgenie-python-sdk#getting-started
I will likely get this if I have an european account since 'host'
Traceback (most recent call last):
File "main.py", line 28, in <module>
api_response = api_instance.create_alert(create_alert_payload)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/opsgenie_sdk/api/alert/__init__.py", line 1136, in create_alert
(data) = self.create_alert_with_http_info(create_alert_payload, **kwargs) # noqa: E501
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/opsgenie_sdk/api/alert/__init__.py", line 1197, in create_alert_with_http_info
return self.api_client.call_api(
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/opsgenie_sdk/api_client.py", line 406, in call_api
return self.__call_api(resource_path, method,
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/opsgenie_sdk/api_client.py", line 234, in __call_api
raise exception
opsgenie_sdk.exceptions.AuthenticationException: You are not authorized to perform this action: (401)
Reason: Unauthorized: apiKey is invalid or integration is disabled
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Date': 'Sat, 02 Nov 2019 11:32:49 GMT', 'X-Response-Time': '0.007', 'X-Request-ID': 'my_api_key', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 87ce1a2818e8b605bc0c86bdab0851bf.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'LHR4', 'X-Amz-Cf-Id': 'Ndo8IxEaP52b32qanl_mpp4sPHUv_sUMjoo0iB7Oz7f1V04Diq_8lg=='})
HTTP response body: {"message": "Could not authenticate", "took": 0.007, "requestId": "21cd1aa5-edd8-4e7a-9493-70608096d9f3", "url": "https://api.opsgenie.com/v2/alerts"}
That's because I'd need to set attribute 'host'. This is resolved through PR
HawkSK
Metadata
Metadata
Assignees
Labels
docs enhancementshould update the documentation to better explain thisshould update the documentation to better explain this