patreon-java icon indicating copy to clipboard operation
patreon-java copied to clipboard

401 error

Open DevJoey opened this issue 5 years ago • 4 comments

I get this exception org.jsoup.HttpStatusException: HTTP error fetching URL. Status=401, URL=https://www.patreon.com/api/oauth2/token at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:682) at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:629) at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:261) at org.jsoup.helper.HttpConnection.post(HttpConnection.java:256) at com.patreon.PatreonOAuth.getTokens(PatreonOAuth.java:57) at net.proxysocke.gittest.LoadUp.main(LoadUp.java:34)

my code public static String clientid = "sec"; public static String clientsecret = "sec"; public static String redirectUri = "my url";

public static String code = "code";

public static void main(String[] args) {
	
	try {
		PatreonOAuth authClient = new PatreonOAuth(clientid, clientsecret, redirectUri);
		PatreonOAuth.TokensResponse tok = authClient.getTokens(code);
		
		
	} catch (Exception e) {
		e.printStackTrace();
	}

} }

What i make wrong and what is code how i can get a "code" please provide a better documentation. the api is useless

DevJoey avatar Apr 17 '20 15:04 DevJoey

I have the same issue... Can't anyone help us?

oleggtro avatar Apr 30 '20 15:04 oleggtro

bump and i have the same issue

jman13378 avatar Sep 09 '22 19:09 jman13378

I moved on, but I guess they changed the API and didn't update this wrapper. The last commit on master was in 2018 after all

oleggtro avatar Sep 09 '22 20:09 oleggtro

@jman13378 https://github.com/Patreon/patreon-java/pull/41#issuecomment-897193556 and https://support.patreon.com/hc/en-us/articles/206525646-Patreon-API

oleggtro avatar Sep 09 '22 20:09 oleggtro