Encrypted API execution Details

Steps include in Encrypted API execution:

 

  1. JSON Request Payload :

    { "api-version": "1.0", "security-id": "5c45a01919eab5c4b0ce5484daf8105bc2bbb7bd0e958cb122864c67ac249322", "flow-id": "ZH0RKJvh", "calls": [ { "client-identifier": "7845sdwq", "start-time": "2022-01-23T08:02:53.311+05:30", "contact-numbers": [ "7016225597" ], "keys": [] } ] }

     

  2. Base64 Encoded json payload:

    Online site to convert normal text to base64: https://www.base64encode.org/ ewogICJhcGktdmVyc2lvbiI6ICIxLjAiLAogICJzZWN1cml0eS1pZCI6ICI1YzQ1YTAxOTE5ZWFiNWM0YjBjZTU0ODRkYWY4MTA1YmMyYmJiN2JkMGU5NThjYjEyMjg2NGM2N2FjMjQ5MzIyIiwKICAiZmxvdy1pZCI6ICJaSDBSS0p2aCIsCiAgImNhbGxzIjogWwogICAgewogICAgICAiY2xpZW50LWlkZW50aWZpZXIiOiAiNzg0NXNkd3EiLAogICAgICAic3RhcnQtdGltZSI6ICIyMDIyLTAxLTIzVDA4OjAyOjUzLjMxMSswNTozMCIsCiAgICAgICJjb250YWN0LW51bWJlcnMiOiBbCiAgICAgICAgIjcwMTYyMjU1OTciCiAgICAgIF0sCiAgICAgICJrZXlzIjogW10KICAgIH0KICBdCn0=

     

  3. AES Encryption of base encoded JSON payload:

    Need one key: You can generate any random key (6-8 digit) abcd1234 AES base64 encoded key - YWJjZDEyMzQ= Apply AES encryption on base64 encoded json payload using base64 encoded aes key

     

  4. API to convert request payload to encrypted data:

     

  5. After AES encryption request JSON payload:

     

  6. After RSA encryption on AES base64 encoded key:

     

  7. New encrypted request format:

     

  8. Invoke kairos API:

  9. Take flowid: ZH0RKJvh
    Fetch public-private key of a given flow. (ZH0RKJvh_public.key,ZH0RKJvh_private.key) (Path of keys: /home/PHONON/)

  10. RSA decryption of digital signature:

     

  11. AES decryption using AES base64encoded key: YWJjZDEyMzQ=

     

  12. The original request JSON payload

     

  13. Once the service will receive a normal SON request payload it will apply a normal API process on it and revert the appropriate response.

Steps include in Generate public and private Key For RSA encryption :

Request Parameters:

URL

https://central.phonon.io/kairos-apis/enc/outbound/generateKeyPair

Method

POST

Body

JSON

Headers

Content-Type: application/json

Auth

None

Payload Schema:

Sample Payload:

Request Parameters Explanation:

  1. flow-id: Get the 8 characters alphanumeric Flow ID from the ‘Edit Flow’ page of any Outbound/Outbound Dialer Flow

Response:

<flowID>_public.key and <flowID>_private.key stored at path “home/PHONON” on the server.

All Error Codes:

Status Code

Status Message

Status Name

Status Code

Status Message

Status Name

1

400

Invalid Format

INVALID_FORMAT

2

201

Checksum Repeated

CHECKSUM_REPEATED

3

302

Empty Call List

EMPTY_CALL_LIST

4

500

Failure

FAILURE

5

301

Invalid Flow ID

INVALID_FLOW_ID

6

401

IP Not Whitelisted

IP_NOT_WHITELISTED

7

402

Phone Not Whitelisted

PHONE_NOT_WHITELISTED

8

202

Invalid Security ID

INVALID_SECURITY_ID

9

200

Success

SUCCESS

10

203

API Version not Supported

INVALID_API_VERSION

11

204

Invalid SMS Gateway

INVALID_GATEWAY_ID

12

205

Invalid Contact Number

INVALID_CONTACT_NUMBER

13

206

Failure from Gateway

FAILURE_FROM_GATEWAY

14

207

DID Not Mapped

DID_NOT_MAPPED

15

208

No Mask Available

NO_MASK_AVAILABLE

16

209

Partial Success

PARTIAL_SUCCESS

17

210

Invalid Mandatory Parameters

INVALID_MANDATORY_PARAMETERS

18

303

Max Data List Size Exceeded

MAX_DATA_LIST_SIZE_EXCEEDED

19

211

Validity Expired

VALIDITY_EXPIRED

20

212

Insufficient Balance

INSUFFICIENT_BALANCE

21

304

Invalid Flow Version

INVALID_FLOW_VERSION

22

213

No Data Available

NO_DATA_AVAILABLE

 

This document has been developed by Phonon.io for the sole and exclusive use of the customer / prospective customer with whom this document is being shared. Further, this document has been provided by Phonon.io to the recipient in good faith and based on request from the recipient for the same. This document is a confidential document and contains confidential product technology, workflow and commercial details that are for the sole usage of the intended recipients of this document. Recipients are advised not to share this document with any third party that is not the intended recipient of this document and neither to bring this document in full or parts into the public domain. Any unauthorized access may be brought to Phonon.io’s notice immediately. Phonon.io is free to take any legal action it deems necessary against any person or entity that violates this confidentiality agreement. Phonon.io is bound and governed by the rules of the state of Gujarat in India. In case you are not in agreement with the terms set in this clause or are not an intended recipient of this document, please destroy the document and intimate us of the same at info@phonon.io.