New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow API access to public data without a key #605
Comments
@dlebauer how do I implement the "guest user" on modex bety so we can enable that API key to access the DB? I tried it out on our system and received an API warning
|
Make sure guest user does not exist (all commands are run on bety database):
If this is non zero you have a guest user already Add guest user:
(edit: fixed bad insert, see below) |
Thanks @robkooper Here is my current issue
I get |
My bad, bad copy paste. Try:
|
Thanks!! |
working now!
|
Currently, anyone can access public data with a 'public' key, i.e.
The guest user API key is 9999999999999999999999999999999999999999, and this can be used by anyone to access the metadata tables as well as to any traits records with access_level = 4, i.e.:
https://betydb.org/api/v1/treatments?key=9999999999999999999999999999999999999999
It is difficult to remember this key, so one option would be to change the key to something like 'publickey', but @robkooper suggested the following feature request:
Change the API so that the
key
parameter is optional; if no key is provided, the request is handled as the guest user.The text was updated successfully, but these errors were encountered: