/api/v3/dataproviders
curl -L \
--url 'https://ushahididocs.api.ushahidi.io/api/v3/dataproviders' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"count": 4,
"results": [
{
"id": "frontlinesms",
"url": "https://ushahididocs.api.ushahidi.io//api/v3/dataprovider/frontlinesms",
"name": "FrontlineSMS",
"services": [
"sms"
],
"options": {
"server_url": {
"label": "FrontlineSMS Server URL",
"input": "text",
"description": "The URL where the FrontlineSMS server is installed, i.e. https://server.url.com/",
"rules": [
"required"
]
},
"key": {
"label": "Key",
"input": "text",
"description": "The API key",
"rules": [
"required"
]
},
"secret": {
"label": "Secret",
"input": "text",
"description": "Set a secret so that only authorized FrontlineCloud accounts can send/recieve message.\n\n You need to configure the same secret in the FrontlineCloud Activity.",
"rules": [
"required"
]
}
},
"inbound_fields": {
"Message": "text"
},
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
},
{
"id": "nexmo",
"url": "https://ushahididocs.api.ushahidi.io//api/v3/dataprovider/nexmo",
"name": "Nexmo",
"services": [
"sms"
],
"options": {
"from": {
"label": "From",
"input": "text",
"description": "The from number",
"rules": [
"required"
]
},
"api_key": {
"label": "API Key",
"input": "text",
"description": "The API key",
"rules": [
"required"
]
},
"api_secret": {
"label": "API secret",
"input": "text",
"description": "The API secret",
"rules": [
"required"
]
}
},
"inbound_fields": {
"Message": "text"
},
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
},
{
"id": "smssync",
"url": "https://ushahididocs.api.ushahidi.io//api/v3/dataprovider/smssync",
"name": "SMSSync",
"services": [
"sms"
],
"options": {
"intro_step1": {
"label": "Step 1: Download the \"SMSSync\" app from the Android Market.",
"input": "read-only-text",
"description": "Scan this QR Code with your phone to download the app from the Android Market\n\n <img src=\"https://ushahididocs.api.ushahidi.io/images/smssync.png\" width=\"150\"/>"
},
"intro_step2": {
"label": "Step 2: Android App Settings",
"input": "read-only-text",
"description": "Turn on SMSSync and use the following link as the Sync URL: https://ushahididocs.api.ushahidi.io/sms/smssync"
},
"secret": {
"label": "Secret",
"input": "text",
"description": "Set a secret so that only authorized SMSSync devices can send/recieve message.\n\n You need to configure the same secret in the SMSSync App.",
"rules": [
"required"
]
}
},
"inbound_fields": {
"Message": "text",
"Date": "datetime"
},
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
},
{
"id": "twilio",
"url": "https://ushahididocs.api.ushahidi.io//api/v3/dataprovider/twilio",
"name": "Twilio",
"services": [
"sms"
],
"options": {
"from": {
"label": "Phone Number",
"input": "text",
"description": "The from phone number.\r\n A Twilio phone number enabled for the type of message you wish to send. ",
"rules": [
"required"
]
},
"account_sid": {
"label": "Account SID",
"input": "text",
"description": "The unique id of the Account that sent this message.",
"rules": [
"required"
]
},
"auth_token": {
"label": "Auth Token",
"input": "text",
"description": "",
"rules": [
"required"
]
},
"sms_auto_response": {
"label": "SMS Auto response",
"input": "text",
"description": "",
"rules": [
"required"
]
}
},
"inbound_fields": {
"Message": "text"
},
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}
],
"offset": 0,
"order": "asc",
"orderby": "id",
"curr": "https://ushahididocs.api.ushahidi.io//api/v3/dataproviders?orderby=id&order=asc&offset=0",
"next": "https://ushahididocs.api.ushahidi.io//api/v3/dataproviders?orderby=id&order=asc&offset=0",
"prev": "https://ushahididocs.api.ushahidi.io//api/v3/dataproviders?orderby=id&order=asc&offset=0",
"total_count": 4
}
OK
/api/v3/dataproviders/1
curl -L \
--url 'https://ushahididocs.api.ushahidi.io/api/v3/dataproviders/1' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"id": "email",
"url": "https://ushahididocs.api.ushahidi.io//api/v3/dataprovider/email",
"name": "Email",
"services": [
"email"
],
"options": {
"intro_text": {
"label": "",
"input": "read-only-text",
"description": "In order to receive posts by email, please input your email account settings below"
},
"incoming_type": {
"label": "Incoming Server Type",
"input": "radio",
"description": "",
"options": [
"POP",
"IMAP"
],
"rules": [
"required",
"number"
]
},
"incoming_server": {
"label": "Incoming Server",
"input": "text",
"description": "Examples: mail.yourwebsite.com, imap.gmail.com, pop.gmail.com",
"rules": [
"required"
]
},
"incoming_port": {
"label": "Incoming Server Port",
"input": "text",
"description": "Common ports: 110 (POP3), 143 (IMAP), 995 (POP3 with SSL), 993 (IMAP with SSL)",
"rules": [
"required",
"number"
]
},
"incoming_security": {
"label": "Incoming Server Security",
"input": "radio",
"description": "",
"options": [
"None",
"SSL",
"TLS"
]
},
"incoming_username": {
"label": "Incoming Username",
"input": "text",
"description": "",
"placeholder": "Email account username",
"rules": [
"required"
]
},
"incoming_password": {
"label": "Incoming Password",
"input": "text",
"description": "",
"placeholder": "Email account password",
"rules": [
"required"
]
}
},
"inbound_fields": {
"Subject": "text",
"Date": "datetime",
"Message": "text"
},
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}
OK