Video - InEight Platform
API Bearer Token

TRANSCRIPT

Okay. Now that we have covered the n eight API developer portal, we're gonna go ahead and generate our first bearer token so we can authenticate and get our first API.

Transitioning to Postman for API Testing

We're gonna go ahead and transition over to Postman.

You'll notice here Postman is a good tool for testing APIs and kind of building out the framework for some of our integrations.

Understanding URL Requirements for API Calls

So you'll see here in the top portion, this is where our URL is gonna be. To call many of the API securely, you'll need the bare token.

And it uses Microsoft Azure Active Directory as identity provider and relies on OAuth two point o flows.

Specifically, authentication often happens through Microsoft's common endpoint, which then directs you to your organization's tenant.

So the first step is going to be identifying the URL.

So this URL here, so it's going to be login dot Microsoft online dot com. You'll see a GUID here, a long string of values. This is going to be your Azure AD tenant ID. There's a lot of open source ways to do that, and highly recommended to reach out to your IT to retrieve this value.

Setting Up OAuth for Token Generation

And then we're going to identify that we're using OAuth here and that we're trying to generate a token. From here, now that we've identified our URL and changed our settings to post, we're gonna wanna just kinda jump through here and take a look. We don't have any parameters we need to send.

Authorization, we're gonna go ahead and use no auth. We're taking care of that in a later step.

Headers.

Postman does include a a number of, you know, default headers. These are all fine to leave there. No real need to change those.

Now we're gonna go ahead and head to the body of our request. So this body, for postman purposes, we're gonna wanna use this x dash w w w dot form dash URL encoded.

Required Values for Token Generation

Here, we're gonna have four values that are gonna be required. We're gonna need a scope, a client ID, client secret, and a grant type. This is the value that we're gonna want for the scope. For the client ID and secret, these will be provided by the NA team. If you reach out to your NA technical representative, they'll be able to provide you with your client ID and secret for your specific environment. Please keep in mind that client IDs and secrets are environment specific.

So if you have a test environment and a production environment, they will both have their own unique sets of client IDs and secrets.

Sending the Request and Receiving the Bearer Token

 

So now that we have our request set up, we can just go ahead and click send. What this is doing, and this is gonna reach out to the Microsoft's common endpoint and request a bearer token be generated. From here, as we can see, we have our access token response here. This is gonna be our bearer token that allows us to access the suite.