OAuth2 Authentication

To integrate with the Gladstone API, you must first complete authentication. This ensures that your application can securely connect and interact with our services.

Before you can authenticate, please contact our support team. We will provide you with the credentials and configuration details required to access our API.

You will receive the following:

Once you have these credentials, you can begin authenticating and making requests to the Gladstone API.

How to authenticate

There are a lot of ways to authenticate, but we recommend and support token authentication. You can find the token authentication URL in the Well-Known Configuration that is provided to you.

Token Generation

You can generate an access token using either an API testing tool like Postman or can generate it Programmatically. Following are the instructions listed for generated it via Postman and C#.

  1. Go to Postman and navigate to Auth section.
  2. Choose OAuth 2.0 as the Auth Type.
  3. In section Configure New Token, configure the settings as per the following:
    • Token Name: Descriptive Token Name (e.g., Gladstone API Token)
    • Grant Type: Client Credentials
    • Access Token URL: Use the URL from your Well-Known Configuration that you have been provided with by our support team.
    • Client ID: Your unique Client ID
    • Client Secret: Your unique Client Secret
    • Scope: cloud api
    • Client Authentication: Set to Send as Basic Auth header
  4. Once the above details are entered, click Get New Access Token.

Configurations for generating Access Token via Postman

💻 C#

Use the following Example C# code snippet to authenticate to our API and generate an access token:

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "<environment_baseURL>/identity/connect/token");
var collection = new List<KeyValuePair<string, string>>();
collection.Add(new("grant_type", "client_credentials"));
collection.Add(new("client_id", "<your_client_ID>"));
collection.Add(new("client_secret", "<your_client_secret>"));
collection.Add(new("scope", "cloud api"));
var content = new FormUrlEncodedContent(collection);
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

Connecting to Gladstone API

The generated token can now be used in the Authorization header of all API calls:

Authorization: Bearer <your_access_token>

🧾 Request Structure

You can use the following curl command or Postman to send a request to the Gladstone API:

curl --location --request GET 'https://api.gladstone.com/v1/example-endpoint' \
--header 'Authorization: Bearer eyJhbGciOi...'

That should be it! Just make sure you are able to authenticate to the Gladstone API with the generated Auth Token.

For troubleshooting or renewal of credentials, contact Gladstone Support.

This page as markdown · All pages · llms.txt