-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Description
Hello,
I noticed that in this line of code
label-studio-sdk/src/label_studio_sdk/_extensions/label_studio_tools/core/utils/io.py
Line 233 in 855b393
| headers["Authorization"] = "Token " + access_token |
Authorization header uses the Token scheme. However, according to the documentation, the correct scheme should be Bearer.
I tried the following command using Token:
curl -X GET <Label Studio URL>/<endpoint> -H 'Authorization: Token <my-token>'And received this response:
{
"id": "581f9ced-c880-42c6-af7b-6e1851367db6",
"status_code": 401,
"version": "1.19.0",
"detail": "Invalid token.",
"exc_info": null
}But when I switched to using Bearer:
curl -X GET <Label Studio URL>/<endpoint> -H 'Authorization: Bearer <my-token>'It seemed to work correctly (though I received a warning about binary output, which is expected).
So my question is:
Should the SDK be using Token in the Authorization header, or is Bearer the correct and intended format?
Thanks in advance!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels