AdultWork.com's API with Age Verification

In April 2018 new regulation will come into force requiring that no adult content can be accessed by anyone who has not verified that they are an adult. Our API will take this into account for the developers too. In other words you can and have to control which images are being shown on your pages.

This page will explain how you can make sure you get the correct images returned from our API.

 

Our ProfileBadge, Profile Listings, Gallery Plugin and Movie Plugin already manage this for you!
  1. Check if you need masked images
  2. Identify 'Safe' pictures
  3. How to get safe images only

 

 

Check if you need masked images

The first thing you want to do is to know if the mask is needed for the visitor of your site. Identify the visitor's country as you normally would, for example by IP, and check if that country has AgeVerificationRequired set to true by calling the getCountries endpoint.

 

 

Identify 'Safe' pictures

The API of AdultWork.com returns the URLs of the images users use in their profiles. These images can be unsuitable for minors and therefore we've added properties to those endpoint's output models to indicate if the image should be safe for minors.

For example the GetProfileDetails will return the profile images in various sizes when you supply ReturnImages=true. These images could be safe for minors and the ones that are will have a value of true in their ImageSafe property. Below you'll see an example of the API call (with extra line breaks for display purposes only):

{
...
"Images":
{
	"HasImage1": true,
	
	"Image1Safe": false,
	
	"Image1ThumbnailURL": "https://URL",
	"Image1MediumURL": "https://URL",
	"Image1LargeURL": "https://URL",
	"Image1SquareURL": "https://URL",
	"Image1Description": "The description",
	...
},
...
}
		

You'll see that the Image1Safe has a value that's false. This means the URLs are not safe to show to minors because our moderators did not check them, or the user itself did not state it to be. The name of the 'Safe' properties will always have the same prefix as the URL property.

To clarify here is the complete list:

Original propertySafe property
ImageURL ImageSafe
ProfileThumbnailURL ProfileThumbnailSafe
ProfileSquareURL ProfileSquareSafe
Image1ThumbnailURL Image1Safe
Image1MediumURL Image1Safe
Image1LargeURL Image1Safe
Image1SquareURL Image1Safe
Image2ThumbnailURL Image2Safe
Image2MediumURL Image2Safe
Image2LargeURL Image2Safe
Image2SquareURL Image2Safe
Image3ThumbnailURL Image3Safe
Image3MediumURL Image3Safe
Image3LargeURL Image3Safe
Image3SquareURL Image3Safe
Image4ThumbnailURL Image4Safe
Image4MediumURL Image4Safe
Image4LargeURL Image4Safe
Image4SquareURL Image4Safe
ThumbURL ThumbSafe
PreviewURL PreviewSafe
FullURL FullSafe
ImagesURL ImagesSafe
FirstImageURL FirstImageSafe
FreeGalleryLatestThumbURL FreeGalleryLatestThumbSafe
PrivateGalleryLatestThumbURL PrivateGalleryLatestThumbSafe
MovieClipLatestThumbURL MovieClipLatestThumbSafe
RentalMovieLatestThumbURL RentalMovieLatestThumbSafe

 

 

How to get safe images only?

If it is required to mask the images and the image has not been approved to be suitable for minors, you could add the following header to your API requests to mask the images:

X-MaskImages with the value 1

Below is an example calling the GetProfileDetails endpoint.

GET /profile/getProfileDetails?UserID=191&ReturnImages=true HTTP/1.1
Host: api.adultwork.com
X-ApiKey: {your_apikey}
X-APISecret: {your_secret}
X-MaskImages: 1
	

 

 

 

 

 

Alternately you could mask the image yourself by using a CSS solution.