Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Set App Push Token

Method Objective

The method allows assigning a new App Push token to the user.

Request

EndpointRequest TypeContent-Type
https://api.personaclick.com/mobile_push_tokensPOSTapplication/x-www-form-urlencodedjson

Parameters

NameTypeRequirementDescription
shop_idstringrequiredUnique Store Key in PersonaClick. Located there: Account > Settings > Store Settings
didstringrequiredUnique Device ID. See "Initialization (REST API)" for information about getting and using Device ID.
tokenstringrequiredThe token is to be assigned to the user.
platformstringrequired

Token platform. Available values:

  • android
  • ios
  • ios_firebase (if the iOS app uses Firebase)

API Response Code

HTTP status code

Description
200 OK

The request was successful.

400 Bad RequestSee the "message" property of the API response for details.
403 ForbiddenUnsuccessful authorization.

API Response Data

The response is JSON type with the following properties:

NameTypeDescription
statusstring

Current status. Can have one of two values:

  • success - the request was successful
  • error - the request was unsuccessful
messagestring

The text of the error if it occurred

Request Example

Code Block
languagejs
themeFadeToGrey
curl 'https://api.personaclick.com/mobile_push_tokens' \
  -X 'POST' \
  -H 'content-type: application/x-www-form-urlencodedjson' \
  -d '{"shop_id=0d42fd8b713d0752776ca589cc0056&did=7rjVGhMykT&platform=android&token=":"0d42fd8b713d0752776ca589cc0056","did":"7rjVGhMykT","platform":"android","token":"cCM2SRUF8pO9UaJOqX00wz:APuCScUxcUno1p1Gz6kcV4xux2dnVO1MfEkOen-6fdAlA9JqiTCClKM4Gc6KnUon1bGIbq7o2c03OH-b88vnZmBev7Ho7wAYs3_XOw93YUn5sxNOZ8sq75kjB9UHgoZbbVXrBrWwYhr5"}'



Column

Page Navigation

Table of Contents
maxLevel1
indent0px
stylenone




Related Pages

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
cqllabel in ( "notifications" , "apppush" )