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?

demandé il y a 2 ans98 vues
Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions