I'm attempting to log into the Freelancer.com web api over http, but cannot get past the authentication. It's for a desktop app in java that I can run from prompt, so nothing fancy, but I cant seem to get past step 1 of the process, receiving the authorisation response.
package project.monitor;
import java.io.IOException;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
public class api {
public static void main(String[] args) throws IOException {
String authEndPoint = "https://accounts.freelancer.com/oauth/authorise";
String apiEndPoint = "https://freelancer.com/api";
String str = "https://accounts.freelancer.com/oauth/authorise?" + "response_type=code"
+ "&client_id=<647f4785-fe45-4182-b97a-f401e0b0d641>" + "&redirect_uri=<https://www.google.com/>"
+ "&scope=basic" + "&prompt=select_account%20consent&advanced_scopes=1%203";
String json = Jsoup.connect(str).ignoreContentType(true).execute().body();
System.out.println(json);
}
}
Documentation: https://developers.freelancer.com/docs/authentication/generating-access-tokens
The first step is to redirect your user to the Freelancer.com Identity
authorise url. This redirect prompts the user to give your application
permission to access their protected resources. When a user grants
permission, they will be redirected to an endpoint on your server with an
authorization code to be used in the following steps
How is this done? How do i redirect the authorisation code back to my program in eclipse?