what is YOUR_TOKEN

I want to use an API to retrieve files and perform related operations. I looked at the examples, and it seems that I need YOUR_TOKEN. However, my generated API has two: UPLOADTHING_SECRET UPLOADTHING_APP_ID
No description
11 Replies
草里野兔子
草里野兔子OP5mo ago
i can not find the X-Uploadthing-Api-Key
No description
Matvey
Matvey5mo ago
i think the secret is the api key
草里野兔子
草里野兔子OP5mo ago
but there is two not only one string use for api key
No description
Antonio (Eingin)
Just tested this and the UPLOADTHING_SECRET works for x-uploadthing-api-key
草里野兔子
草里野兔子OP5mo ago
thank you my friend
草里野兔子
草里野兔子OP5mo ago
it not work for me
No description
Antonio (Eingin)
You many need to set the content type header Content-Type: application/json Also your leaking your api key in the screenshot. You should remove that
草里野兔子
草里野兔子OP5mo ago
Thank you for your response. I have added Content-Type: application/json, but it still doesn't work. Thank you for pointing out the issue with the API key. It's partially omitted, so there's no problem.
草里野兔子
草里野兔子OP5mo ago
No description
Antonio (Eingin)
Maybe all the other headers are needed too I was able to call it fine using the web tool: https://docs.uploadthing.com/api-reference/openapi-spec#tag/default/post/listFiles
Openapi Spec – uploadthing
Docs for the best file uploader to date
No description
草里野兔子
草里野兔子OP5mo ago
Want results from more Discord servers?
Add your server