Skip to main content

users

Creates, updates, deletes, gets or lists a users resource.

Overview​

Nameusers
TypeResource
Idovh.sms.users

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
alert_threshold_informationsobjectA structure describing all information about alert threshold informations (wire: alertThresholdInformations)
call_backstringURL called when state of a sent SMS changes (wire: callBack)
ip_restrictionsarray (wire: ipRestrictions)
loginstringThe sms user login
passwordstring
quota_informationsobjectA structure describing all information about quota informations (wire: quotaInformations)
stop_call_backstringURL called when a STOP is received after a receiver replied stop to a SMS (wire: stopCallBack)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectlogin, service_nameGet a user. Returns the API user: login, callback URLs, quota left and status, alert threshold and the IP addresses allowed to send SMS.
listselectservice_namex_pagination_modeList users. Returns the logins of the API users of the SMS account. Each user sends SMS with its own login, callback URLs, quota and IP restrictions.
createinsertservice_name, login, passwordCreate a user. Creates an API user with a login and a password, to send SMS with its own callback URLs, quota and IP restrictions.
updateupdatelogin, service_nameUpdate a user. Updates the API user: password, callback URLs, quota, alert threshold and the IP addresses allowed to send SMS.
deletedeletelogin, service_nameDelete a user. Deletes the API user of the SMS account. Its login and password can no longer be used to send SMS.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
loginstringThe sms user login
service_namestringThe internal name of your SMS offer (wire: serviceName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a user. Returns the API user: login, callback URLs, quota left and status, alert threshold and the IP addresses allowed to send SMS.

SELECT
alert_threshold_informations,
call_back,
ip_restrictions,
login,
password,
quota_informations,
stop_call_back
FROM ovh.sms.users
WHERE login = '{{ login }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create a user. Creates an API user with a login and a password, to send SMS with its own callback URLs, quota and IP restrictions.

INSERT INTO ovh.sms.users (
login,
password,
service_name
)
SELECT
'{{ login }}' /* required */,
'{{ password }}' /* required */,
'{{ service_name }}'
;

UPDATE examples​

Update a user. Updates the API user: password, callback URLs, quota, alert threshold and the IP addresses allowed to send SMS.

UPDATE ovh.sms.users
SET
alert_threshold_informations = '{{ alert_threshold_informations }}',
call_back = '{{ call_back }}',
ip_restrictions = '{{ ip_restrictions }}',
password = '{{ password }}',
quota_informations = '{{ quota_informations }}',
stop_call_back = '{{ stop_call_back }}'
WHERE
login = '{{ login }}' --required
AND service_name = '{{ service_name }}' --required;

DELETE examples​

Delete a user. Deletes the API user of the SMS account. Its login and password can no longer be used to send SMS.

DELETE FROM ovh.sms.users
WHERE login = '{{ login }}' --required
AND service_name = '{{ service_name }}' --required
;