You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for i, url in enumerate(urls):
image = await DataRoom.create_image(image_id=f'notebook-{i}', image_url=url, source='website')
print(image['id'])
returns
DataRoomError: Client error '403 Forbidden' for url 'http://localhost:8000/api/images/'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403
403
{"detail":"Invalid token."}
despite having created an admin account with my email address and having generated an API_KEY using
from django.contrib.auth import get_user_model
User = get_user_model()
user = User.objects.get(email="my_email")
from rest_framework.authtoken.models import Token
token, created = Token.objects.get_or_create(user=user)
print(token.key)
inside the shell terminal (docker compose run --rm dataroom_django python manage.py shell) while dev server is running.