Problem obtaining Oauth token (curl)

I followed the recent tutorial here:

In the section:
“For Bearer authorization:
Use this syntax to get an access token using CURL:”

Based on the tutorial, I have the following commands (for debian linux):

## encode username/pw, read into env variable
dewey_pass=$(echo -n "username:passwd" | openssl base64)
## curl: input encoded password 
curl -X 'POST' '' -H 'Accept: application/json' -H 'Authorization: Basic ${dewey_pass}'

I receive the following error:

{"timestamp":"2022-12-20T02:38:37.818+00:00","status":500,"error":"Internal Server Error","path":"/api/auth/tks/get_token"}% 

I’ve double-checked that I’m using the correct username/password for the basic auth string (i.e., its what I use to login to I also get the same server response for any username/pw.

I’ve also tried downloading file list using basic auth (following tutorial), and I always get a blank response regardless of auth string.

Am I missing something??

1 Like

Hi @Christian_Gunning_University_of_Georgia, I think I just linked this to you in another post, but I would suggest checking out this tool. It is an updated and implemented version of the tutorial you are looking at now.

Just now I was able to get my access token and files via API. Could you run through the linked tool and verify that it works for you? That will help pinpoint where the issue is coming in.

Update: This was quoting issue in both shell and request. The following works:

## zsh / debian linux
dewey_pass=$(echo -n "username:password" | openssl base64) 
curl -X POST "" -H "Authorization: Basic $dewey_pass"

Request: Can you check the following line in the “How to Access Files…” tutorial? It doesn’t make sense without additional context, and I believe should be replaced with something like the above (see my comment at the bottom of that page):

echo -n "" base64



Glad it’s working for you now! Yes, we can make that edit. Thanks for the feedback!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.