You can’t insert usernames and passwords directly, but you can do this with the API. Each user requires two requests:
First Request: create a new user
Do this with a POST request to baseurl/api/users?no_invite. Your request should include a JSON object with name and email keys. The no_invite querystring variable forces Redash to return an invite_link in the response.
Second Request: Push a password
POST to the invite_link URL from the first request. This network request should be multi-part form encoded with a single key: password.
Commentary
I’d avoid forcing the passwords with the second request. It’s probably sufficient to make the first network request, note the invite_link and share that with your users through some internal system. But that’s up to you.
The CLI can do it to But there’s no reason you can’t do it via the API. I suspect you received an error because you didn’t include an Authorization header in your HTTP request.