ibmresilient / resilient-community-apps

Source code for IBM SOAR Apps that are available on our App Exchange
https://ibm.biz/soar-apps-docs
MIT License
88 stars 96 forks source link

fn_pagerduty pdpyras.PDClientError: Received 401 Unauthorized response from the API #83

Open irom77 opened 2 years ago

irom77 commented 2 years ago

Description

Getting error below even thout API key is correct (works when pasted into my code snippet)

Traceback (most recent call last): File "/home/resadmin/.local/lib/python3.6/site-packages/fn_pagerduty/components/pd_create_incident.py", line 41, in _pagerduty_create_incident_function resp = create_incident(createDict) File "/home/resadmin/.local/lib/python3.6/site-packages/fn_pagerduty/components/pd_common.py", line 47, in create_incident resp = session.post(INCIDENT_FRAGMENT, payload) File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 590, in post return self.request('POST', url, data=data, json=json, **kwargs) File "/home/resadmin/.local/lib/python3.6/site-packages/pdpyras.py", line 559, in request response=response) pdpyras.PDClientError: Received 401 Unauthorized response from the API. The access key (*xxxx) might not be valid.

Describe How to Reproduce

Run Menu Item Trigger PagerDuty Incident on any existing incident