How to delete an AWS Pinpoint Endpoint via Amplify JS?

0

Hello,

I am using Amplify to created AWS Pinpoint endpoints which I use further for segments, campaigns, journeys etc.

Creating the endpoint works fine for me by doing something like this:

  let endpoint = {
            address: this.email, 
            attributes: {
                eventStatusUpdate: [true],
                wantsToUnsubscribe : [false],
            },
            channelType: 'EMAIL', 
            optOut: 'NONE',
            userId: this.email,
            userAttributes: {
              email: [this.email]
          }
        }

    Analytics.updateEndpoint(endpoint).then((event) => {
      console.log("ENDPOINT EVENT", event)
    });

To delete the endpoint, in an email that users receive I have a button that redirects them to a Unsubscribe Page where I have another endpoint that gets the email of the user but I am not sure what to do from that point. I have multiple endpoints for the same user with the same email but apparently all those endpoints get different ID's.

I have no idea how to delete the specific endpoint I want so that the user can be unsubscribed and not receive emails anymore.

I hope you can help me with that?

已提问 2 年前98 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则