Skip to content
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

vespadb API: How to authenticate using bearing token, without cookie #354

Open
PietrH opened this issue Feb 10, 2025 · 0 comments
Open

vespadb API: How to authenticate using bearing token, without cookie #354

PietrH opened this issue Feb 10, 2025 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@PietrH
Copy link
Member

PietrH commented Feb 10, 2025

I'm trying to write up how to use the API via curl.

Login via:

curl -X POST "https://uat-db.vespawatch.be/login/" \
  -H "Content-Type: application/json" \
  -d '{"username":"{username}","password":"{password}"}'

Returns : {"detail":"Login successful.","token":"{bearer_token}"}

Now, how to place a follow up request with this token?

curl -X 'GET'   'https://uat-db.vespawatch.be/observations/?municipality_id=195'   -H 'accept: application/json'   -H 'Authorization: {bearer_token}'

Returns the exact same result as without the Authorization request header. What am I doing wrong?

@PietrH PietrH added the question Further information is requested label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants