Use the Java sample code to implement the functions of obtaining tokens and requesting AGD links.
Sample Code
Download Package
Java sample code
Click here