Name:
interface
Value:
Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Page updated Apr 30, 2024

Maintenance ModeYou are viewing Amplify Gen 1 documentation. Amplify Gen 1 has entered maintenance mode and will reach end of life on May 1, 2027. New project should use Amplify Gen 2. For existing Gen 1 projects, a migration guide and tooling are available to help you upgrade. Switch to the latest Gen 2 docs →

ユーザーの識別

AWS will end support for Amazon Pinpoint on October 30, 2026,, and is no longer accepting any new users as of May 20 (see the linked doc). The guidance is to use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics. Pinpoint recommends Amazon Kinesis for event collection and mobile analytics.

この API は、現在のユーザーに関する情報を Amazon Pinpoint に送信します。

ユーザー名、メール、位置情報、デバイスなどの追加情報は、UserProfile を指定することで含めることができます。カスタム属性は UserProfile.customProperties を設定することで含めることもできます。

ユーザーが signIn を通じてサインインした場合、以下に示すように現在のユーザーの ID を取得できます:

import { identifyUser } from 'aws-amplify/analytics';
import { getCurrentUser } from 'aws-amplify/auth';
const location = {
latitude: 47.606209,
longitude: -122.332069,
postalCode: '98122',
city: 'Seattle',
region: 'WA',
country: 'USA'
};
const customProperties = {
plan: ['plan'],
phoneNumber: ['+11234567890'],
age: ['25']
};
const userProfile = {
location,
name: 'username',
email: 'name@example.com',
customProperties
};
async function sendUserData() {
const user = await getCurrentUser();
identifyUser({
userId: user.userId,
userProfile
});
}