Zoomdata Version

Requesting an Access Token

After you have registered an application as an OAuth client with a particular Zoomdata server and provided the client ID to the client, the client application can request permission from the Zoomdata server to access a user's resources by requesting an access token. Before the Zoomdata server will serve the request, the user must specifically authorize it to do so using Zoomdata's login screen. When the user has authorized the server to serve resources to the client, the server will grant the client an access token. Your client can request an access token using the following steps.

To request an access token from a Zoomdata server:

  1. Use a Javascript library that supports HTTP calls, such as jQuery, to program your client to make an HTTP GET request to the following URL.
    yourserver /zoomdata/oauth/authorize?client_id= 123 &redirect_uri= https://www.yourapp.com &response_type=token&scope=read
    • yourserver is replaced with your server's DNS or IP address, together with any necessary port number
    • 123 is replaced with your app's registered clientId
    • https://www.yourapp.com is replaced with the URI (with correct protocol) to which Zoomdata should redirect the browser upon successful login/authorization by the user.
      As part of the OAuth 2.0 protocol, Zoomdata will only redirect the user's browser to a URI included in the registeredRedirectURIs list provided to Zoomdata when the client is registered.
    When your user successfully completes the login/authorization request, the Zoomdata server redirects the user's browser to the redirect_uri that you specified in the GET call above. The full URI to which the user's browser is redirected includes a parameter called access_token . For example:
  2. In your application on the page receiving the redirect, extract the access_token parameter from the URI that loaded the page.
    Popular sites like Stack Overflow can provide guidance on how to extract parameters from the URI used to query a page. For example, see Get URL parameter... in js .

After you have extracted the access token, your application can use it to request a transaction .