Init‐Journey‐Token - nxtele/nxcloud-doc-en GitHub Wiki

Initialize Journey Token

Get Zalo Journey Token through API

  • URL:https://api.nxcloud.com/v1/zalo/initJourneyToken
  • Method:POST
  • Content-Type:application/json
  • Authentication required:Yes

Authentication Mechanism

Please refer to the authentication rules at the specified address:The API interface invocation conventions(https://github.com/nxtele/http-api-document/wiki/API%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%BA%A6%E5%AE%9A)

Parameters Header:

Parameter Datatype Mandatory Example Value Description
accessKey String yes fme2na3kdi3ki User identity identifier
ts String yes 1655710885431 The current timestamp of the request (units: milliseconds). The NXCLOUD server allows a maximum time deviation of 60 seconds for client requests
bizType String yes 9 The Zalo business type, set to a fixed value“9”
action String yes mt Send Zalo ZNS request,set to a fixed value“mt”
sign String yes 6e9506557d1f289501d333ee2c365826 The API input parameter signature,Signature algorithm

Receipt Parameters

  • body parameters:
Parameter Datatype Mandatory Example Value Description
appkey String yes pem28kje Application appkey
phone String yes 86158xxxx1795 The Zalo phone number of the message recipient must include the country code. For example, 86158xxxx1795
tokenType String yes token_logistics_7 Journey Token Type: token_logistics_7token_logistics_30token_coach_bus_7token_coach_bus_30

Receipt Examples

{
    "appkey": "cWF32dfsa",
    "phone": "848xxxx1795",
    "tokenType": "token_logistics_7"
}

Example Respond

Successful Example

{
    "code": 0,
    "message": "Success",
    "data": {
        "journeyId": "1257624175686111232",
        "token": "HmXFqeO5jM1Mw96XuhlVwR1uQQQAxvu8faW8LtTFhXaHuDrywWweA9Zt5bmFCy0JZOMG_2uo3ZWdRDS1rBeJ7NnOZgiLtw78NzDehSkeEyWJCETRMvHCF-8PVSI16UjNuEMVkAkP21p-xCcMcba7l74cJuouUgZlyW1sMIx1Dm6yu6aKswXaeG3zSCb5mYwJb-AZvxsFd8U1BJhmNQYKPe78TyRz5NphTrX-bI8wF5bOpYDxv4DmkcDDgABP6n6E"
    }
}

Failure Example

{
    "code": -1,
    "message": "Failure",
    "traceId": "77f8709b545f4fee93fd7f098be9df04"
}

Status code description

Code Message Description
0 Success
-1 Failure Please contact technical personnel to troubleshoot the issue.
1000~100X Authentication failed For more information, please refer to the API authentication section.
1100 Customer does not exist / Status is unavailable Account status abnormal. Please contact the business personnel to resolve the account issue.
9000 Request parameter error Parameter missing. Please check the required parameters.
9001 System business error System business error. Please contact technical personnel to troubleshoot the issue.
9002 Phone number error Illegal number. Please check the correctness of the number.
9003 Customer APP does not exist / Status is unavailable Application status abnormal. Please contact the business personnel to address the cloud platform application creation/disabling issue.
9004 Customer APP does not have quotation Application pricing missing. Please contact the business personnel to address the application pricing issue.
9005 Missing customer APP routes Application routing missing. Please contact technical personnel to investigate the route.
9010 Rate limit exceeded Rate limit exceeded
17009 Zalo vendor token does not exist Vendor Journey Token quotation does not exist
17010 Zalo vendor token status is unavailable Vendor Journey Token quotation status is unavailable
9999 Unknown error Please contact technical personnel to troubleshoot the issue.