-
Notifications
You must be signed in to change notification settings - Fork 22
Description
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