[Support Request]: Is there a way to make users over API during testing? i.e. Postman, etc.? #2615

Closed
opened 2026-02-05 04:37:35 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @mxchinegod on GitHub (Jan 30, 2022).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I see CSRF and bookstack_session and I don't want to run into a situation where I'm basically scraping those cookies to make a POST request.

Is there a way alternatively to just put users into the DB with SQL if needed without much hassle? I looked in /database/seeders but couldn't find out how any User seeding was occurring.

What's the best way to make something like a curl request and end up with a new user for testing?

Exact BookStack Version

v21.11-dev

Log Content

No response

PHP Version

No response

Hosting Environment

Dockerfile & repo clone

Originally created by @mxchinegod on GitHub (Jan 30, 2022). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario I see CSRF and bookstack_session and I don't want to run into a situation where I'm basically scraping those cookies to make a POST request. Is there a way alternatively to just put users into the DB with SQL if needed without much hassle? I looked in /database/seeders but couldn't find out how any User seeding was occurring. What's the best way to make something like a curl request and end up with a new user for testing? ### Exact BookStack Version v21.11-dev ### Log Content _No response_ ### PHP Version _No response_ ### Hosting Environment Dockerfile & repo clone
OVERLORD added the 🐕 Support label 2026-02-05 04:37:35 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 30, 2022):

Hi @DylanAlloy,
There's no users API right now but one was started in #2734.
You could interact directly with the database, following the existing format (users table primarily) but you may have a challenge or cause issues trying to get the extact right format, aligned to what the interface would do, especially in terms of connecting up relations.

The only official way in this area of things is the command to create an admin user:
https://www.bookstackapp.com/docs/admin/commands/#create-an-admin-user

Note, there is a logical theme system where you could add endpoints/logic/commands without editing core files:
https://github.com/BookStackApp/BookStack/blob/master/dev/docs/logical-theme-system.md

@ssddanbrown commented on GitHub (Jan 30, 2022): Hi @DylanAlloy, There's no users API right now but one was started in #2734. You could interact directly with the database, following the existing format (`users` table primarily) but you may have a challenge or cause issues trying to get the extact right format, aligned to what the interface would do, especially in terms of connecting up relations. The only official way in this area of things is the command to create an admin user: https://www.bookstackapp.com/docs/admin/commands/#create-an-admin-user Note, there is a logical theme system where you could add endpoints/logic/commands without editing core files: https://github.com/BookStackApp/BookStack/blob/master/dev/docs/logical-theme-system.md
Author
Owner

@mxchinegod commented on GitHub (Jan 31, 2022):

Thank you. This was the direction I needed to make a throwaway API endpoint to co-register a user from a request originating on a subdomain under the same Apache server.

@mxchinegod commented on GitHub (Jan 31, 2022): Thank you. This was the direction I needed to make a throwaway API endpoint to co-register a user from a request originating on a subdomain under the same Apache server.
Author
Owner

@ssddanbrown commented on GitHub (Jan 31, 2022):

@DylanAlloy Happy to help, will therefore close this off.

@ssddanbrown commented on GitHub (Jan 31, 2022): @DylanAlloy Happy to help, will therefore close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2615