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?

posta 2 anni fa98 visualizzazioni
Nessuna risposta

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande