Question: To secure an API endpoint, making it accessible to registered users only, you can replace the rest_framework.permissions.allowAny value in the default_permissions section of your settings.py to

  1. rest_framework.permissions.IsAdminUser
  2. rest_framework.permissions.IsAuthenticated
  3. rest_framework.permissions.IsAuthorized
  4. rest_framework.permissions.IsRegistered

Answer: The correct answer of the above question is Option B:rest_framework.permissions.IsAuthenticated