registerCustomer

Creates new customer account in Cleeng database and generates customerToken.

📘

customerToken expires after 60 days. Expiration time can be extended using extendTokenExpiration method.

🚧

Enterprise account required. Contact us if you're interested about opening Enterprise account.

📘

You can try that method by clicking here

Parameters

Name

Type

Description

publisherToken*

string

Your publisher token. To open enterprise account contact us.

customerData*

string

Required customer data

-email*

string

Customer's email

-locale*

string

Defines language and text formatting for the user. E.g. "en_US", "fr_FR"

-country*

string

2-letter country code

-currency*

string

Choose one: USD, EUR, GBP, CAD, AUD, NZD, SEK, DKK, NOK, TRL, ZAR, XOF

-password

string

Customer's password

-facebookId

string

Customer's FacebookId

-registrationDate

integer

Unix timestamp - Customer's registration date

-externalId

string

Customer's external ID

Result Parameters

Name

Type

Description

token

string

Customer token used to identify the user

API Request/Response

Request

{
  "method": "registerCustomer",
  "params": {
    "publisherToken": "Ilrx-SjTLVMCsaRsOf2q2hvWKOlrF57yHknDRRRMX-13Fz-x",
    "customerData": {
      "email": "[email protected]",
      "locale": "pl_PL",
      "country": "PL",
      "currency": "EUR",
      "password": "password",
      "facebookId": "123456789012345",
      "registrationDate": "1451606400",
      "externalId": "OKK734237462384"
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}

Response

{
  "result": {
    "token": "AKr47GhD_tF7yWoKHinzfHjG7Ad_gta-TezKwyHVkxRHOYHs"
  },
 "id": "1",
 "jsonrpc": "2.0"
}

ErrorCodes

Code

Description

3

Invalid publisher token

5

Access denied

11

Invalid arguments

13

Customer already exists