1👍
✅
add to you view this code:
from rest_framework import permissions
class SnippetListCreateView(ListCreateAPIView):
permission_classes = [
permissions.IsAuthenticated
]
Source:stackexchange.com