Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi,
i wanted to learn how to use the Dropbox API, so i followed the Tutorial and adapted it to my program. Now, when i want to use the .getAccountInfo() - method, i get an error:
Exception in thread "main" java.lang.IllegalArgumentException: Illegal character(s) in message header value: Bearer <the access token>
I have no idea why this happens, the access token seems to be correct.
I hope someone here can help me.
Unfortunately this will be hard to debug remotely, since you need to redact the access token itself, for the sake of security.
Where did you get the access token and how are you loading it though? Can you double check there aren't any stray characters on it? E.g., if you copied and pasted it from somewhere, make sure there aren't any invisible characters that got included. You could try copying it in to a plain text editor to make sure you only have plain text.
For reference, access tokens should look like this:
Zu9U1XOZl8QAAAAAAAMnj9WQmUPh1KcbbU4uh2ks-t_viUgiJG4OF1jBFH3KwF9p
(I've redacted this one to share as an example.)
Thanks for your quick answer, i checked the acces token file again and noticed that it had two lines (1 empty line). I dont know where that came from, but i removed it and now everything works fine!
Thanks for the help!
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!