콘텐츠로 건너뛰기

User centric API

registerUser

Anchor link to

POST https://api.pushwoosh.com/json/1.3/registerUser

외부 User ID 를 지정된 기기와 연결합니다.

Request headers

Anchor link to
이름필수설명
AuthorizationToken XXXXDevice API 에 액세스하기 위한 API Device Token. XXXX 를 실제 Device API 토큰으로 교체하십시오.

Request body

Anchor link to
이름유형설명
userIdstring기기와 연결할 User ID. 비어 있으면 hwid 를 사용합니다.
application*stringPushwoosh application code
hwid*stringPushwoosh HWID
tz_offsetinteger기기의 타임존 오프셋(초 단위).
device_typeintegerDevice type. /registerDevice 에서 가능한 값을 참조하십시오.
{
"status_code": 200,
"status_message": "OK",
"response": null
}

나중에 /createMessage API 호출(users 매개변수)에서 사용할 수 있습니다.
Push 토큰을 받기 전이나 /registerDevice 호출 전에 이 함수를 호출하는 것은 정상입니다.

Example
{
"request": {
"userId": "user_3078a", // 선택 사항. 비어 있으면 hwid 사용
"application": "XXXXX-XXXXX", // 필수. Pushwoosh application code
"hwid": "8f65b16df378e7a6bece9614e1530fb2", // 필수. Hardware device ID
"tz_offset": -3600, // 선택 사항. 타임존 오프셋(초 단위)
"device_type": 3 // 선택 사항. Device type, 기기 유형은 /registerDevice 참조
}
}

POST https://api.pushwoosh.com/json/1.3/postEvent

이벤트를 호출합니다.

Request headers

Anchor link to
이름필수설명
AuthorizationToken XXXXDevice API 에 액세스하기 위한 API Device Token. XXXX 를 실제 Device API 토큰으로 교체하십시오.

Request body

Anchor link to
이름유형설명
hwid*string/registerDevice 요청에서 사용된 Hardware device ID. 이벤트를 트리거한 사용자를 식별하기 위해 ‘userId’와 함께 사용할 수 있습니다.
application*stringPushwoosh application code
event*stringPushwoosh Control Panel 에서 생성된 것과 정확히 일치하는 Event name.
attributes*object이벤트 속성이 포함된 JSON 객체입니다. 전달할 속성이 없으면 비워 두십시오.
timestampUTCintegerUTC 타임스탬프.
timestampCurrentinteger현지 시간 타임스탬프.
userId*string이벤트를 트리거한 사용자와 연결된 User ID. HWID 로 대체하거나 함께 사용할 수 있습니다.
device_typeinteger가능한 값 참조
{
"status_code": 200,
"status_message": "OK",
"response": {
"code": "61BC9-84DD0"
}
}

요청의 이벤트 이름은 Pushwoosh Control Panel 의 이벤트 이름과 일치해야 합니다. 이벤트에 속성이 없는 경우 “attributes” 속성은 비어 있을 수 있지만 생략할 수는 없습니다.

Example
{
"request":{
"hwid": "8f65b16df378e7a6bece9614e1530fb2", // 필수. /registerDevice API 에서 사용된 Hardware device ID.
// 이벤트를 트리거한 사용자를 식별하기 위해 userId 와
// 함께 사용할 수 있습니다.
"application": "XXXXX-XXXXX", // 필수. Pushwoosh application code
"event": "activityCompleted", // 필수. Pushwoosh Control Panel 에서 생성된 것과 정확히 일치하는 이벤트 이름
"attributes": { // 필수. 전달할 속성이 없으면 비워 두십시오.
"login": "facebook",
"success": "yes",
"internet": "wifi",
},
"timestampUTC": 1435228403, // 선택 사항. UTC 타임스탬프
"timestampCurrent": 1435253603, // 선택 사항. 현지 시간 타임스탬프
"userId": "someuser@user.com", // 필수. 여러 기기에서 사용자를 식별하는 데 사용되는 User ID.
// HWID 로 대체하거나 함께 사용할 수 있습니다.
"device_type": 1 // 선택 사항.
}
}