Integration and Authentication on Android App

Hi, I am new here and needed complete information regarding Upstox API’s. I gone through the API documentation as well but having few confusion

  1. I am developing my own android app ( Java) and for db and user management using Python hosted on aws
  2. I need clarification regarding how i can use Upstox Api for my client data ? meaning i need to fetch client orderbook into my app
  3. How to make sure client is logged in into my app using upstox ? Because documentation saying redirect URL but how i can do it ? any code example will be helpful at android levels

Hi @Murli_Jadhav
Based on your previous post, you’re developing an Android application in Java with a Python backend service hosted on AWS. The first step will be to implement a method for user authorization and access token generation.

The redirect URL plays an important role here. After the user authorizes themselves with Upstox, they will be redirected to the redirect URL that they would have specified while creating an API app, which is typically the welcome or homepage of your application.

A new access token will be generated after completing the second step of authorization, as detailed here. You’ll also need a secure mechanism to manage access tokens for each user, as this token must be included with every REST call made to the Upstox API service.

For simpler implementation of REST calls to our APIs, you can use the Python SDK.

I hope this helps! If you have any further questions, feel free to leave a comment in this thread.

Thank you!

1 Like

@Ketan Thanks for your reply
Main confusion here is I am using Java for Android app and python just for transactional purposes on the server side

Now In redirected URL i can’t paste my page URL because in the end, i have to redirect the user to android app page ( which is in java and its called as Intents)

Can you please clarify how i can request from the android app and get a token for the user and what will be my redirected URL ? any sample code example will be helpful for everyone

Also, I have one more question: If users want to connect Upstox with my app, then they have to mention the app name and details in their Profile → App section.

Thanks

Hi @Murli_Jadhav, See if the discussion below is helpful.