Welcome to the Metacleaner API! This API allows your app to integrate seamlessly with our metacleaner service, enabling automated metadata removal and cleanup.
Go to your dashboard's Integrations page:
There, provide:
After submitting, you will receive:
Click the Authorization Endpoint URL. This will open a page showing:
If you click Authorize, you will be redirected to your API Callback URL with a code parameter appended:
Important: Copy this authorization code from the URL. You will need it for the next step.
Send a POST request to:
With the following form data (application/x-www-form-urlencoded):
Parameter | Description | Example |
---|---|---|
grant_type | Must be authorization_code | authorization_code |
client_id | Your Client ID | abc123xyz |
client_secret | Your Client Secret | shh-its-a-secret |
redirect_uri | Your API Callback URL | https://your-callback-url.com/callback |
code | The authorization code from Step 2 | AUTHORIZATION_CODE_HERE |
curl -X POST https://metacleaner.com/oauth/token \
-d "grant_type=authorization_code" \
-d "client_id=your_client_id" \
-d "client_secret=your_client_secret" \
-d "redirect_uri=https://your-callback.com" \
-d "code=AUTH_CODE_HERE"
You'll receive:
{
"token_type": "Bearer",
"expires_in": 3600,
"access_token": "YOUR_ACCESS_TOKEN",
"refresh_token": "REFRESH_TOKEN"
}
Use the access_token to call the cleaning endpoint:
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: multipart/form-data
Field | Description |
---|---|
files[] | File(s) to clean (array) |
curl -X POST https://metacleaner.com/api/files \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-F "files[]=@/path/to/yourfile1.jpg" \
-F "files[]=@/path/to/yourfile2.png"
{
"contents": [
{
"filename": "cleaned1749572403_yourfile1.jpg",
"path": "https://test.metacleaner.com/storage/cleaned1749572403_yourfile1.png"
},
{
"filename": "cleaned1749572404_yourfile2.png",
"path": "https://test.metacleaner.com/storage/cleaned1749572404_yourfile2.png"
}
]
}
If you need assistance or wish to upgrade to an advanced or enterprise plan: