addAccount #
Adds a SMS Envoi account. This account can then be used to send SMS.
The params object must match the provider's account JSON Schema (accountParamsSchema), exposed by hermes:listProviders.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_/hermes/providers/smsenvoi/accounts/:accountId
Method: PUTOther protocols #
{
"controller": "hermes",
"action": "addAccount",
"providerId": "smsenvoi",
"accountId": "<account id>",
"body": {
"displayName": "<label>", // optional
"params": {
"user_key": "<SMS Envoi user key>",
"access_token": "<SMS Envoi access token>",
"default_sender": "<default sender>"
}
}
}Kourou #
kourou hermes:addAccount -a providerId=smsenvoi -a accountId=<account id> --body '{
"params": {
"user_key": "<SMS Envoi user key>",
"access_token": "<SMS Envoi access token>",
"default_sender": "<default sender>"
}
}'Arguments #
providerId: provider identifier,smsenvoiaccountId: identifier to register the account under, unique within the provider
Body properties #
displayName(optional): label for user interfaces; defaults toaccountIdparams.user_key: SMS Envoi user keyparams.access_token: SMS Envoi access tokenparams.default_sender: sender used whenparams.fromis not provided onsendMessage
Response #
Returns an empty result on success.
{
"requestId": "d16d5e8c-464a-4589-938f-fd84f46080b9",
"status": 200,
"error": null,
"controller": "hermes",
"action": "addAccount",
"result": null
}