Files
2026-07-12 10:17:17 -04:00

949 B

PocketBase Test User Creation

Quick test accounts for local development — no admin auth needed if the users collection allows public creation.

Create user

curl -s -X POST http://127.0.0.1:8091/api/collections/users/records \
  -H "Content-Type: application/json" \
  -d '{"email":"demo@shop.com","password":"test1234","passwordConfirm":"test1234","emailVisibility":true}'

Verify login

curl -s -X POST http://127.0.0.1:8091/api/collections/users/auth-with-password \
  -H "Content-Type: application/json" \
  -d '{"identity":"demo@shop.com","password":"test1234"}'

Returns a JWT token on success. Use the token in Authorization: Bearer <token> for authenticated requests.

Notes

  • If public creation is disabled, authenticate as admin first and use the admin token
  • passwordConfirm must match password exactly
  • emailVisibility: true makes the email visible in record listings and API responses