Skip to content
Discussion options

You must be logged in to vote

The console token (session token) for RAGFlow is not returned in the JSON body of the login API response. Instead, after you log in with POST /v1/user/login, the token is sent in the HTTP response headers under the Authorization field. You need to extract it from the headers, not the body. Here’s a Python example:

import requests

url = "http://your-ragflow-host/v1/user/login"
data = {"email": "your_email", "password": "your_encrypted_password"}
resp = requests.post(url, json=data)
token = resp.headers["Authorization"]
print(token)

Use this token as Authorization: <token> (no Bearer prefix) in subsequent API requests. If you need an API key (for endpoints that require it), send a POST to /…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RobertWangWang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant