In the digital age, where content is king, the influx of spam hinders genuine user experience and interferes with business growth. Recognizing the need for a robust and integrated solution, Backendless implemented an API service dedicated to detecting spam in supplied content. Tailored for Backendless developers, this service is a blend of technical prowess and business acumen, ensuring applications remain spam-free while aligning with business goals. The service provider is OOPSpam, an expert in spam detection technologies.
reportSpamDetection
method, it refines its detection techniques, reducing false positives and negatives.Backendless spam detection API service is not just a technical tool but a business asset. It safeguards user trust, enhances platform credibility, and ensures that genuine content gets the spotlight it deserves. Developers and businesses can now confidently move forward, knowing that they have a vigilant guard against spam, tailored just for them.
The method analyses given parameters and returns an overall spam score. The returned score is a value between 0 and 6 representing. The higher this value, the more likely the content is spam. While it depends on the use case, the returned score of 3 or higher can be considered spam.
Method:
GET
Endpoint URL:
https://xxxx.backendless.app/api/services/OOPSpamDetector/getSpamDetectionScore
The xxxx.backendless.app
is a subdomain assigned to your application. For more information, see the Client-side Setup section of the Backendless documentation.
Request Headers:
Content-Type:application/json
Request URL Parameters:
Parameter name | Required/Optional | Default value | Description |
content |
Required | A content you would like to be analyzed. | |
senderIP |
Optional | The IP address of the original content/message sender (NOT your IP address). This field value will be looked up in multiple IP denylists that previously detected sending spam. Although senderIP is an optional field, it is recommended to send it. |
|
email |
Optional | The email address of the original content/message sender (NOT your email address). This field value will be looked up in multiple email denylists that previously detected sending spam. Although email is an optional field, it is recommended to send it. |
|
checkForLength |
Optional | true |
If the content is shorter than 20 characters, it will be considered spam (Score: 5 ) and returns isContentTooShort: true . |
urlFriendly |
Optional | false |
Treat the content parameter as more link-friendly and reduce the impact of links on the spam score. |
allowedLanguages |
Optional | Must be a JSON array of string values. Allows blocking content based on content language. Specify in what language(s) you expect the content to be by passing a string of a two-letter language(s) code to the parameter as an array. | |
allowedCountries |
Optional | Must be a JSON array of string values. Allows content only from a certain country or countries. Specify the allowed countries as the two-letter country codes in the array. | |
blockedCountries |
Optional | Must be a JSON array of string values. Blocks content from a certain country or countries. Specify the countries to block as the two-letter country code in the array. |
Request Body:
N/A – since this is a GET
request, the request body is empty.
Response Body:
Returns an object with a spam-detection summary of the content. The primary property is Score which contains a number between 0 and 6. The higher this value, the more likely the content is spam. While it depends on the use case, the returned score of 3 or higher can be considered spam.
Example:
curl -X "GET" "https://www.backendless.us/api/services/OOPSpamDetector/SpamDetectionScore?content=Dear%20Agent%2C%20We%20are%20a%20manufacturing%20company%20which%20specializes%20in%20supplying%20Aluminum%20Rod%20with%20Zinc%20Alloy%20Rod%20to%20customers%20worldwide%2C%20based%20in%20Japan%2C%20Asia.%20We%20have%20been%20unable%20to%20follow%20up%20payments%20effectively%20for%20transactions%20with%20debtor%20customers%20in%20your%20country%20due%20to%20our%20distant%20locations%2C%20thus%20our%20reason%20for%20requesting%20for%20your%20services%20representation.&senderIP=185.234.219.246&email=testing%40example.com&checkForLength=false&urlFriendly=false&allowedCountries=%5B%20%20%20%20%20%20%20%20%20%22it%22%2C%20%20%20%20%20%20%20%20%20%22us%22%20%20%20%20%20%5D&blockedCountries=%5B%20%22ru%22%20%5D" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json'
Response:
For a complete list of supported response body parameters, see the OOPSpam API documentation.
{ "Score": 3, "Details": { "isEmailBlocked": false, "isContentSpam": "spam", "spamWords": [ "dear", "winner", "winner", "$", "million", "$", "million", "watch", "here", "watch" ], "numberOfSpamWords": 19 } }
You can use this method to report any false positives and false negatives to OOPSpam. All the submissions will be available on OOPSpam Dashboard under the Reported page. The status of each report will be either Solved or Pending. OOPSpam analyzes them and improves detection for your use case. Every processed submission will be marked as Solved.
Method:
POST
Endpoint URL:
https://xxxx.backendless.app/api/services/OOPSpamDetector/reportFalseSpamDetection
The xxxx.backendless.app
is a subdomain assigned to your application. For more information, see the Client-side Setup section of the Backendless documentation.
Request Headers:
Content-Type:application/json
Request Body:
The request body must be a JSON object with the structure shown below:
{ "shouldBeSpam": false, "content": "string", "senderIP": "string", "email": "string", "checkForLength": false, "urlFriendly": false, "allowedLanguages": [ "string" ], "allowedCountries": [ "string" ], "blockedCountries": [ "string" ] }
See the OOPSpam API documentation for a detailed explanation of the parameters.
Response Body:
Returns an object indicating the report has been accepted for analysis:
{ "message": "success" }
Example:
curl -X "POST" "https://www.backendless.us/api/services/Oopspam/spamDetection" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d $'{ "shouldBeSpam":true, "content": "Dear winner I am Mr Richard Wahl, the mega winner of $533 Million USD in Mega Millions Jackpot, I'm donating to 5 random individuals if you get this email then your email was selected after a spin ball. I have spread most of my wealth over a number of charities and organizations.I have voluntarily decided to donate the sum of $2 Million USD to you as one of the selected 5, to verify my winnings please see my youtube website page below. WATCH ME HERE: https://www.youtube.com/watch?v=tne02ExNDrw? $533 Million Jackpot Winner Revealed: Modest Mega Millionaire Richard Wahl Richard Wahl recently moved to New Jersey from Michigan and has only played the lottery a few times before winning the $533 million Mega Millions lottery jackpot. www.youtube.com THIS IS YOUR DONATION CODE: 0043034 Reply with the DONATION CODE to this email: He will send it to you either by Cashier check or ATM Card. Contact my personal Assistant Name: James Williams Email: jameswilliams0xx@gmail.com Hope to make you and your family happy during this difficult time. Regards Mr.Richard Wahl", "email": "chickendinner@jackpotsRus.com" }'
Response:
For a complete list of supported response body parameters, see the OOPSpam API documentation.
{ "message": "success" }