949 B
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
passwordConfirmmust matchpasswordexactlyemailVisibility: truemakes the email visible in record listings and API responses