Obtain an access token

Obtain an access token

Before your application can access private data using Penta-b API, it must obtain an access token that grants access to that API. A single access token can grant varying degrees of access to multiple APIs.

There are several ways to make a token request, and they vary based on the type of application you are building. For example, a JavaScript application might request an access token using a browser redirect, while an application installed on a device that has no browser, uses web service requests.

Since Penta-b’s APIs supports OAuth 2.0 and OpenID Connect, any client that supports these standards will easily be able to authenticate and authorize users as needed by the application.

    • Related Articles

    • Refresh the access token

      Access tokens have limited lifetimes. If your application needs access to a Penta-b’s API beyond the lifetime of a single access token, it can obtain a refresh token. A refresh token allows your application to obtain new access tokens
    • Testing obtaining access tokens

      After receiving the OAuth 2.0 credentials, the configurations can be checked easily using Postman. Here is how: Open a new Postman request. Navigate to the Authorization tab, and select OAuth 2.0 from TYPE 3. Click on Get New Access Token button 4. ...
    • Send the access token to an API

      After the application obtains an access token, it should send the token to a Penta-b’s API in an HTTP Authorization request header. The following headers should be added to each request: PentaUserRole: the selected user’s role PentaOrgID: the ...
    • Obtain OAuth 2.0 credentials

      After sending us all the needed info to register the client application, you’ll receive your OAuth 2.0 credentials, including a client ID, authorized url, client secret (depending on the client’s access type), and a JSON file containing all the ...
    • How to access /use a secured layer using my token?

      You can access any secured layer using your token depending on your preference using one of the below methods: · QGIS ◦ From data source manager, add a new connection ◦ Enter connection name ◦ Enter layer URL you have from the secured links at MnA ...