Skip to main content
API Reference
Cards
OAuth Applications

An OAuth Application lets you build an application for others to use with their Increase data. You can create an OAuth Application via the Dashboard and read information about it with the API. Learn more about OAuth here.

The OAuth Application object
{
  "client_id": "client_id_ec79nb1bukwwafdewe88",
  "created_at": "2020-01-31T23:59:59Z",
  "deleted_at": null,
  "id": "application_gj9ufmpgh5i56k4vyriy",
  "name": "Ian Crease's App",
  "status": "active",
  "type": "oauth_application"
}
Attributes
client_id
string

The OAuth Application’s client_id. Use this to authenticate with the OAuth Application.

created_at
string

The ISO 8601 timestamp when the OAuth Application was created.

deleted_at
string
Nullable

The ISO 8601 timestamp when the OAuth Application was deleted.

id
string

The OAuth Application’s identifier.

name
string
Nullable

The name you chose for this OAuth Application.

status
enum

Whether the application is active.

type
string

A constant representing the object’s type. For this resource it will always be oauth_application.

List OAuth Applications
curl \
  --url "${INCREASE_URL}/oauth_applications" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
import Increase from 'increase';

const client = new Increase({
  apiKey: process.env['INCREASE_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const oauthApplication of client.oauthApplications.list()) {
  console.log(oauthApplication.id);
}
import os
from increase import Increase

client = Increase(
    api_key=os.environ.get("INCREASE_API_KEY"),  # This is the default and can be omitted
)
page = client.oauth_applications.list()
page = page.data[0]
print(page.id)
require "increase"

increase = Increase::Client.new(
  api_key: ENV["INCREASE_API_KEY"] # This is the default and can be omitted
)

page = increase.oauth_applications.list

puts(page)
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/Increase/increase-go"
	"github.com/Increase/increase-go/option"
)

func main() {
	client := increase.NewClient(
		option.WithAPIKey(os.Getenv("INCREASE_API_KEY")), // This is the default and can be omitted
	)
	page, err := client.OAuthApplications.List(context.TODO(), increase.OAuthApplicationListParams{})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", page)
}
package com.increase.api.example;

import com.increase.api.client.IncreaseClient;
import com.increase.api.client.okhttp.IncreaseOkHttpClient;
import com.increase.api.models.oauthapplications.OAuthApplicationListPage;
import com.increase.api.models.oauthapplications.OAuthApplicationListParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        IncreaseClient client = IncreaseOkHttpClient.fromEnv();

        OAuthApplicationListPage page = client.oauthApplications().list();
    }
}
package com.increase.api.example

import com.increase.api.client.IncreaseClient
import com.increase.api.client.okhttp.IncreaseOkHttpClient
import com.increase.api.models.oauthapplications.OAuthApplicationListPage
import com.increase.api.models.oauthapplications.OAuthApplicationListParams

fun main() {
    val client: IncreaseClient = IncreaseOkHttpClient.fromEnv()

    val page: OAuthApplicationListPage = client.oauthApplications().list()
}
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Increase\Client;
use Increase\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('INCREASE_API_KEY'));

try {
  $page = $client->oauthApplications->list(
    createdAt: [
      'after' => new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
      'before' => new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
      'onOrAfter' => new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
      'onOrBefore' => new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
    ],
    cursor: 'cursor',
    limit: 1,
    status: ['in' => ['active']],
  );

  var_dump($page);
} catch (APIException $e) {
  echo $e->getMessage();
}
using System;
using Increase.Api;
using Increase.Api.Models.OAuthApplications;

IncreaseClient client = new();

OAuthApplicationListParams parameters = new();

var page = await client.OAuthApplications.List(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
Returns a list response :
{
  "data": [
    { /* OAuth Application object */ },
    { /* OAuth Application object */ }
    /* ... */
  ],
  "next_cursor": "v57w5d",
}
Parameters
status.in
array of strings

Return results whose value is in the provided list. For GET requests, this should be encoded as a comma-delimited string, such as ?in=one,two,three.

More
cursor
string
limit
integer
created_at.after
string
created_at.before
string
created_at.on_or_after
string
created_at.on_or_before
string
Retrieve an OAuth Application
curl \
  --url "${INCREASE_URL}/oauth_applications/application_gj9ufmpgh5i56k4vyriy" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
import Increase from 'increase';

const client = new Increase({
  apiKey: process.env['INCREASE_API_KEY'], // This is the default and can be omitted
});

const oauthApplication = await client.oauthApplications.retrieve(
  'application_gj9ufmpgh5i56k4vyriy',
);

console.log(oauthApplication.id);
import os
from increase import Increase

client = Increase(
    api_key=os.environ.get("INCREASE_API_KEY"),  # This is the default and can be omitted
)
oauth_application = client.oauth_applications.retrieve(
    "application_gj9ufmpgh5i56k4vyriy",
)
print(oauth_application.id)
require "increase"

increase = Increase::Client.new(
  api_key: ENV["INCREASE_API_KEY"] # This is the default and can be omitted
)

oauth_application = increase.oauth_applications.retrieve("application_gj9ufmpgh5i56k4vyriy")

puts(oauth_application)
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/Increase/increase-go"
	"github.com/Increase/increase-go/option"
)

func main() {
	client := increase.NewClient(
		option.WithAPIKey(os.Getenv("INCREASE_API_KEY")), // This is the default and can be omitted
	)
	oauthApplication, err := client.OAuthApplications.Get(context.TODO(), "application_gj9ufmpgh5i56k4vyriy")
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", oauthApplication.ID)
}
package com.increase.api.example;

import com.increase.api.client.IncreaseClient;
import com.increase.api.client.okhttp.IncreaseOkHttpClient;
import com.increase.api.models.oauthapplications.OAuthApplication;
import com.increase.api.models.oauthapplications.OAuthApplicationRetrieveParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        IncreaseClient client = IncreaseOkHttpClient.fromEnv();

        OAuthApplication oauthApplication = client.oauthApplications().retrieve("application_gj9ufmpgh5i56k4vyriy");
    }
}
package com.increase.api.example

import com.increase.api.client.IncreaseClient
import com.increase.api.client.okhttp.IncreaseOkHttpClient
import com.increase.api.models.oauthapplications.OAuthApplication
import com.increase.api.models.oauthapplications.OAuthApplicationRetrieveParams

fun main() {
    val client: IncreaseClient = IncreaseOkHttpClient.fromEnv()

    val oauthApplication: OAuthApplication = client.oauthApplications().retrieve("application_gj9ufmpgh5i56k4vyriy")
}
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Increase\Client;
use Increase\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('INCREASE_API_KEY'));

try {
  $oauthApplication = $client->oauthApplications->retrieve(
    'application_gj9ufmpgh5i56k4vyriy'
  );

  var_dump($oauthApplication);
} catch (APIException $e) {
  echo $e->getMessage();
}
using System;
using Increase.Api;
using Increase.Api.Models.OAuthApplications;

IncreaseClient client = new();

OAuthApplicationRetrieveParams parameters = new()
{
    OAuthApplicationID = "application_gj9ufmpgh5i56k4vyriy"
};

var oauthApplication = await client.OAuthApplications.Retrieve(parameters);

Console.WriteLine(oauthApplication);
Parameters
oauth_application_id
string
Required

The identifier of the OAuth Application.

More about OAuth Applications.