Report Profiles
Learn how to report a profile for inappropriate behavior.
The Lens API allows any authenticated user to report any Profile for a given reason. See the examples for all the reasons available.
You must be authenticated with the Profile reporting the behaviour. See Profile Login for more information.
- React SDK
- JavaScript SDK
- API
The ProfileReportReason enum in the React SDK provides a list of all possible reasons for reporting a profile:
enum ProfileReportReason { // Fraud IMPERSONATION = 'IMPERSONATION', FRAUD_SOMETHING_ELSE = 'FRAUD_SOMETHING_ELSE',
// Spam REPETITIVE = 'REPETITIVE', SPAM_SOMETHING_ELSE = 'SPAM_SOMETHING_ELSE',}
You can use the useReportProfile hook to report a profile.
Available in @lens-protocol/react-web and @lens-protocol/react-native
import { ProfileReportReason, profileId, useReportProfile,} from '@lens-protocol/react-web';
const { execute: report, loading } = useReportProfile();
const handleSubmit = async () => { const result = await report({ profileId: profileId('0x01'), reason: ProfileReportReason.IMPERSONATION, additionalComments: 'Human readable comments, if any.', });
if (result.isSuccess()) { alert('Profile reported!'); }};
<button onClick={handleSubmit} disabled={loading}> Report</button>
You can find the full example in the Lens SDK GitHub repository.
That's it—you now know how to report a Profile for inappropriate behavior.