Currently, curbing mobile money fraud in the country is nearly impossible. To tackle this issue, we propose developing a real-time database that allows users to query and determine if a phone number is likely fraudulent based on public contributions, especially from those who have experienced fraud.
Endpoint: /api/keys/restrict/{keyId}
Method: PUT
Description: Allows users to add or update domain restrictions for an existing API key.
Authorization Required: Yes
Parameters:
Domains: A list of new or updated domains for restriction.
Validations:
Domains:
Each domain must be in a valid format.
Check for domain uniqueness within the user's API keys to ensure no duplicate restrictions.
Security Measures:
Authorization Check: Ensure the user is authenticated and owns the API key before updating restrictions.
Input Sanitization: Validate and sanitize the input domains to avoid injection attacks.
Feedback:
Success: "Domain restrictions updated successfully."
Failure: "Failed to update domain restrictions. Ensure domains are valid and unique."
Endpoint: /api/keys/restrict/{keyId} Method: PUT Description: Allows users to add or update domain restrictions for an existing API key. Authorization Required: Yes
Parameters: Domains: A list of new or updated domains for restriction. Validations: Domains: Each domain must be in a valid format. Check for domain uniqueness within the user's API keys to ensure no duplicate restrictions.
Security Measures: Authorization Check: Ensure the user is authenticated and owns the API key before updating restrictions. Input Sanitization: Validate and sanitize the input domains to avoid injection attacks.
Feedback: Success: "Domain restrictions updated successfully." Failure: "Failed to update domain restrictions. Ensure domains are valid and unique."