Puristchat
 
English
IPHONE 1 2 3
and you are done...It's that easy!

1. REGISTER

Use the PuristChat REST API to register for the chat support service. This needs to be called only once per user.

https://api.puristchat.com/register

Authentication

Use HTTP Basic Authentication, with your Server API Key as the HTTP username, and a blank HTTP password.


POST Parameters

Parameter

Description

username*

Any username that can uniquely identify your user in your system

password*

The password (hidden from user), that you need to pass before signing in the user into the chat room. You may use the same password that the user has with your system

name*

User's name that will be displayed to the operator.

loc_lat

The latitude of the user’s current location

loc_long

The longitude of the user’s current location


Example

curl -i -u 38500bd28a404bf99b14c45422b77171: \
  -d 'username=jdoe&password=pass1234&name=John+Doe&loc_lat=48.858222&loc_long=2.294500' \
  https://api.puristchat.com/register.xml

Response

HTTP 201

<result>
   <p_username>puristit_username</p_username>
   <p_password>puristit_password</p_password>
</result>


2. INITIALIZE

Use the PuristChat REST API to initialize the chat support service. This needs to be called once per user before the Chat URL expires. We recommend calling this at least 24 hours before expiry, to ensure the user is not kept waiting while you try to renew his Chat URL.

https://api.puristchat.com/initialize

Authentication

Use HTTP Basic Authentication, with your Server API Key as the HTTP username, and the p_password returned when registering the customer as the HTTP password.


POST Parameters

Parameter

Description

p_username*

PuristChat username returned to you by the register API

platform*

ANDROID or IPHONE or WINDOWS

validity

Validity of the Chat URL in hours. Default is 168 hours (7 days). Maximum value for this field is 720 hours (30 days).

loc_lat

The latitude of the user’s current location

loc_long

The longitude of the user’s current location

language

The ISO code of the language on the user’s device. Example en, fr, ja etc. This will render the chat portal to be opened in the user’s language


Example

curl -i -u 38500bd28a404bf99b14c45422b77171:pass1234 \
  -d 'p_username=jdoe%40mycompany.puristchat.com&platform=Android&validity=30' \
  -d 'loc_lat=48.858222&loc_long=2.294500&language=en' \
  https://api.puristchat.com/initialize.xml

Response

HTTP 201

<result>
   <chat_url>chat_url</chat_url>
</result>


3. CHAT

You need to add a button to your app (anywhere you like), which says Support or Help or Troubleshoot or something similar. This button when clicked should load an in-app webview which loads the chat portal for the user to connect with your online support operators.

Webview

OTHER APIs

(i) UNSUBSCRIBE

Use the PuristChat REST API to unsubscribe the user from the chat support service. This needs to be called only once per user.

https://api.puristchat.com/unsubscribe

Authentication

Use HTTP Basic Authentication, with your Server API Key as the HTTP username, and the p_password returned when registering the customer as the HTTP password.


POST Parameters

Parameter

Description

p_username*

PuristChat username returned to you by the register API


Example

curl -i -u 38500bd28a404bf99b14c45422b77171:pass1234 \
  -d 'p_username=jdoe%40mycompany.puristchat.com' \
  https://api.puristchat.com/unsubscribe.xml

Response

HTTP 204

No body.


(ii) CHANGE PASSWORD

Use the PuristChat REST API to change the PuristChat password of the user.

https://api.puristchat.com/change_password

Authentication

Use HTTP Basic Authentication, with your Server API Key as the HTTP username, and the p_password returned when registering the customer as the HTTP password.


POST Parameters

Parameter

Description

p_username*

PuristChat username returned to you by the register API

new_password*

New PuristChat password for the user


Example

curl -i -u 38500bd28a404bf99b14c45422b77171:pass1234 \
  -d 'p_username=jdoe%40mycompany.puristchat.com&new_password=pass8765' \
  https://api.puristchat.com/change_password.xml

Response

HTTP 204

No body.


Try it for free