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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠