import ModerationAPI from '@moderation-api/sdk';
const client = new ModerationAPI({
secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
});
const authors = await client.authors.list();
console.log(authors.authors);{
"authors": [
{
"id": "<string>",
"first_seen": 123,
"last_seen": 123,
"status": "enabled",
"trust_level": {
"level": 123,
"manual": true
},
"block": {
"until": 123,
"reason": "<string>"
},
"risk_evaluation": {
"risk_level": 50
},
"metrics": {
"total_content": 123,
"flagged_content": 123,
"average_sentiment": 123
},
"metadata": {
"email_verified": true,
"phone_verified": true,
"identity_verified": true,
"is_paying_customer": true
},
"external_id": "<string>",
"profile_picture": "<string>",
"external_link": "<string>",
"name": "<string>",
"email": "[email protected]",
"last_incident": 123
}
],
"pagination": {
"total": 123,
"pageSize": 123,
"pageNumber": 123,
"hasNextPage": true,
"hasPreviousPage": true
}
}Get a paginated list of authors with their activity metrics and reputation
import ModerationAPI from '@moderation-api/sdk';
const client = new ModerationAPI({
secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
});
const authors = await client.authors.list();
console.log(authors.authors);{
"authors": [
{
"id": "<string>",
"first_seen": 123,
"last_seen": 123,
"status": "enabled",
"trust_level": {
"level": 123,
"manual": true
},
"block": {
"until": 123,
"reason": "<string>"
},
"risk_evaluation": {
"risk_level": 50
},
"metrics": {
"total_content": 123,
"flagged_content": 123,
"average_sentiment": 123
},
"metadata": {
"email_verified": true,
"phone_verified": true,
"identity_verified": true,
"is_paying_customer": true
},
"external_id": "<string>",
"profile_picture": "<string>",
"external_link": "<string>",
"name": "<string>",
"email": "[email protected]",
"last_incident": 123
}
],
"pagination": {
"total": 123,
"pageSize": 123,
"pageNumber": 123,
"hasNextPage": true,
"hasPreviousPage": true
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Number of authors per page
Page number to fetch
trustLevel, violationCount, reportCount, memberSince, lastActive, contentCount, flaggedContentRatio, averageSentiment Sort direction
asc, desc Successful response
Show child attributes
Author ID in Moderation API
Timestamp when author first appeared
Timestamp of last activity
Current author status
enabled, suspended, blocked Show child attributes
Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process.
Show child attributes
Whether the author's email is verified
Whether the author's phone number is verified
Whether the author's identity is verified
Whether the author is a paying customer
The author's ID from your system
URL of the author's profile picture
URL of the author's external profile
Author name or identifier
Author email address
Timestamp of last incident
Was this page helpful?