Add an email endpoint using CLI

0

Hi,
I'm trying to "add a new" email endpoint using the aws cli and I run into this error:

An error occurred (NotFoundException) when calling the UpdateEndpoint operation: Resource not found

Any help is appreciated.

Below is my command and payload. The endpoint-id below is a guid which I generated.

$ cat cmd 
aws pinpoint update-endpoint \
			 --application-id testProject \
			 --endpoint-id "43498e83-9dae-4ce6-bb12-8e08e3699776" \
			 --endpoint-request file://newemailuser.json
$ cat newemailuser.json 
{
  "ChannelType": "EMAIL",
  "Address": "user@example.com",
  "OptOut": "NONE",
  "Attributes": {
    "interests": [
      "technology",
      "music",
      "travel"
    ]
  },
  "Metrics": {
    "technology_interest_level": 9.0,
    "music_interest_level": 6.0,
    "travel_interest_level": 4.0
  },
  "Demographic": {
    "AppVersion": "1.0",
    "Make": "apple",
    "Model": "iPhone",
    "ModelVersion": "8",
    "Platform": "ios",
    "PlatformVersion": "11.3.1",
    "Timezone": "America/Los_Angeles"
  },
  "Location": {
    "Country": "US",
    "City": "Seattle",
    "PostalCode": "98121",
    "Latitude": 47.61,
    "Longitude": -122.33
  },
  "User": {
    "UserAttributes": {
      "name": [
        "John",
        "Doe"
      ],
      "gender": [
        "male"
      ],
      "age": [
        "39"
      ]
    },
    "UserId": "john_doe"
  }
}

Edited by: kmyn on May 28, 2019 9:44 AM

kmyn
質問済み 5年前240ビュー
3回答
0

Hi kmyn,

It looks like you're passing the name of the Pinpoint project for the application-id parameter. You need to pass the alphanumeric ID.

You can find the ID by using the get-apps command in the AWS CLI.

Hope that helps!

Brent @ AWS

AWS
回答済み 5年前
0

Hi Brent,

This worked perfectly thanks. Some followup questions:

  1. How do I verify recipient endpoints? So as to send emails to them.
  2. How do I create an unsubscribe like for a recipient when I send the email?
  3. If an email is verified in SES, can the same be used in Pinpoint ?

Thanks.

kmyn
回答済み 5年前
0

Glad to hear it worked!

If you're planning to send emails to external recipients, you have to submit a request to have your account removed from the Pinpoint sandbox. When your account is out of the sandbox, you can send email to any recipient without having to verify the address first. For more information, see https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-email-setup-production-access.html.

Currently, you have to create a system to handle unsubscribe requests. Our Developer Guide contains a tutorial that you can follow to set up an unsubscribe/preference management system. For more information, see https://docs.aws.amazon.com/pinpoint/latest/developerguide/tutorials-email-prefs.html.

If you previously verified an email address or domain in Amazon SES, you can use that address or domain to send email through Amazon Pinpoint.

Thanks,

Brent

AWS
回答済み 5年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ