403 when accessing bulk delete visitor endpoint

When accessing the `Bulk Delete Visitor` API (to service user deletion requests), I keep getting a 403 error. However, requests to other API endpoints using the same code snippet works just fine. Either I do not have permission to use that end point (which would be odd because I am an admin) OR there is a typo/error in the URI of the endpoint in the docs. Would love for you to please have a look and resolve this for us.

Below is the code I am using (copied over from your docs):

import requests
import json

url = "https://app.pendo.io/api/v1/bulkdelete/visitor"

payload = json.dumps({
  "visitors": [
    "visitorId",
    "visitorId2"
  ]
})
headers = {
  'Content-Type': 'application/json',
  'x-pendo-integration-key': os.environ["PENDO"]
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response)
0

コメント

1件のコメント
  • Hi Vivek,

    I've tried that script and it does work as expected against my test account.  I was able to reproduce a 403 error by using an integration key without write access.  Please double check the key you're using.  As long as you use the correct level of access, that specific payload should give you a 400 with

    could not find visitor visitorId
    could not find visitor visitorId2

    You can see this by adding print(response.text) at the end of your script.

    0

サインインしてコメントを残してください。

お探しのものを見つけられませんでしたか?

新規投稿