Global OAuth Clients

JSON format

Global OAuth Clients are represented as JSON objects with the following properties:

NameTypeRead-onlyMandatoryDescription
companystringtruefalseThe company that users are asked to approve access to
descriptionstringtruefalseA short description of the client
idintegertruefalseAutomatically assigned when the client is created
identifierstringtruefalseThe unique identifier for the client
logo_urlstringtruefalseThe API logo url of this record
namestringtruefalseThe name of the client

Example

{  "company": "Zendesk",  "description": "Zendesk global Client",  "id": 1,  "identifier": "global_client",  "logo_url": "https://example.com/logo",  "name": "Global Client"}

List Global OAuth Clients

  • GET /api/v2/oauth/global_clients

Returns all the global OAuth clients that users on your account have authorized.

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

Allowed For

  • Admins

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/oauth/global_clients.json \  -v -u {email_address}:{password}
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://support.zendesk.com/api/v2/oauth/global_clients"	method := "GET"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "username:password"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://support.zendesk.com/api/v2/oauth/global_clients")		.newBuilder();
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("GET", null)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", Credentials.basic("your-email", "your-password"))		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'GET',  url: 'https://support.zendesk.com/api/v2/oauth/global_clients',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requests
url = "https://support.zendesk.com/api/v2/oauth/global_clients"headers = {	"Content-Type": "application/json",}
response = requests.request(	"GET",	url,	auth=('<username>', '<password>'),	headers=headers)
print(response.text)
Ruby
require "net/http"uri = URI("https://support.zendesk.com/api/v2/oauth/global_clients")request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")request.basic_auth "username", "password"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end

Example response(s)

200 OK
// Status 200 OK
{  "global_clients": [    {      "id": 223443,      "name": "Stats Widget"    },    {      "id": 8678530,      "name": "Zendesk Mobile"    }  ]}