Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unauthorized when using Jumblr #123

Open
KCPKCP opened this issue Oct 20, 2018 · 2 comments
Open

Unauthorized when using Jumblr #123

KCPKCP opened this issue Oct 20, 2018 · 2 comments

Comments

@KCPKCP
Copy link

KCPKCP commented Oct 20, 2018

Hello,

I'm trying to retrieve the Users name using Jumblr and keep receiving the following error:

com.tumblr.jumblr.exceptions.JumblrException: Unauthorized

The following is what I'm using:

// Authenticate via OAuth
JumblrClient client = new JumblrClient( consumerKey, consumerSecret );
client.setToken( token,  tokenSecret );

// Make the request
User user = client.user();

The error always points to the line of "User user = client.user();" I've search Google and StackedOverflow quite a few times and always end up banging my head on the screen.

Any assistance would be greatly appreciated...

Thanks in advance...

@jasonpenny
Copy link

When I run that code with my key and token,
System.out.println(user.getName()); outputs my username

Unauthorized means that your key/secret/token/token-secret are not valid for some reason.
You should try creating a new token.

@KCPKCP
Copy link
Author

KCPKCP commented Nov 5, 2018

I apologize for replying wayyyyy too late, but thanks for your answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants