I am trying to integrate upstox api on my locally hosted wordpress site for SGB live data. I have WPgetAPI plugin

Now my questions are:

  1. What should be my redirect URL? is it my locally hosted wp page URL?
  2. Since I want SGB live data, I searched documentation for instruments where I found last traded price. This is what I need.
  3. I put my base URL as : ```
is this correct?
4. The plugin is also asking for end point, I put it as /login/authorization/dialog 
Is this correct?
5. I guess I am doing something wrong as when I test the endpoint, it throws error.
Please help

@Pradeep_Jaiswar please help!


Thank you for contacting us!

It appears you are encountering difficulties integrating our API suite with Wordpress. I recommend trying our Postman collection, which can help clarify any doubts regarding execution. Additionally, our documentation provides insights into the authentication flow. Once you have successfully executed the APIs using Postman, integrating them into Wordpress should become more straightforward.

Please keep us informed of your progress.

Thank you!

Hi @shanmu thanks very much for your reply. I have downloaded the zip file from Postman collection and started using the JSON content importer plug-in on my WordPress site.

I got it load but I guess now I need to input the base URL, redirect uri, and API key in the json code.

Can you please confirm if this is correct?

plz refer to below code:
now, I don’t know from where to get the code. (in thiscase it is beTcHw)

please help.
“key”: “client_id”,
“value”: “6e46d831-d6d7-46b2-83f7-b9509fbde35b”,
“description”: “(Required) OAuth API key that is a public identifier for app”
“key”: “client_secret”,
“value”: “dcba5gizzp”,
“description”: “(Required) OAuth client secret that is a private secret known only to app and authorization server”
“key”: “code”,
“value”: “beTcHw”,
“description”: "(Required) "
“key”: “grant_type”,
“value”: “authorization_code”,
“description”: “(Required) Type of grant used to get an access token”
“key”: “redirect_uri”,
“value”: “”,
“description”: “(Required) Authorization server will redirect the user back to the application via redirect URL”


Please refer to the instructions provided in the document to generate the code. I recommend investing time in thoroughly understanding our API through the document, as it will be beneficial in the long run.

Thank you!

Thanks @shanmu, on it

1 Like