Skip to main content

Get Basic Enterprise Information

Read public enterprise information such as the enterprise name and logo.

API information​

ItemDescription
API nameGet Basic Enterprise Information
Permission scopeenterprise.info.read(read basic enterprise information)
HTTP methodPOST / GET
Endpointhttps://{gateway_host}/open/v1/enterprise/info
Data formatapplication/json(for POST) or URL query
AuthenticationApp-level access_token(requires enterprise.info.read permission)

Note:The actual request path for this API ends with /info ; there is no trailing /get.

Prerequisites​

  1. The app has been published and enabled under "Internal Apps" in the admin console.
  2. A valid app-level access_token has been obtained.

Request parameters​

HeaderRequiredDescription
AuthorizationNoBearer <access_token>,recommended credential transport method; choose it instead of query or form authentication
Content-TypeNoSend application/json when a POST request uses JSON

Parameter list​

This API has no required business parameters:

ParameterTypeRequiredDescription
access_tokenstringYesApp-level token(if it is not sent in the Authorization header, it is required)
targetCorpIdstringNoCompatibility placeholder; it is ignored and does not affect the returned enterprise information

Request examples​

POST Request examples:

POST https://{gateway_host}/open/v1/enterprise/info
Authorization: Bearer <access_token>
Content-Type: application/json

{}

GET Request examples:

GET https://{gateway_host}/open/v1/enterprise/info
Authorization: Bearer <access_token>

Response parameters​

Successful response (the platform's unified response envelope):

{
"code": 200,
"msg": "",
"data": {
"name": "Example Enterprise",
"logo": "https://cdn.example.com/logo.png"
}
}
FieldTypeDescription
codeintegerBusiness status code; 200 indicates success
msgstringMessage; empty on success
data.namestringRegistered/display name of the enterprise
data.logostringEnterprise logo image URL; omitted when not configured

Permissions and visibility scope​

  1. Not affected by visibility scope:Basic enterprise information is tenant-wide display data, not restricted by the app's member/department visibility scope.
  2. Private configuration protection:Private enterprise settings, payment parameters, security keys, and similar admin-console data are sensitive internal data outside the open capability scope and are never returned by this API.

Error codes​

Authentication and middleware errors (HTTP status)​

HTTP statusmsg Error codeDescription
401INVALID_TOKENThe token is missing, expired, revoked, or the app is unavailable
403SCOPE_DENIEDThe token lacks enterprise.info.read permission
403IP_DENIEDThe source IP is not in the IP allowlist configured in the app security settings

Business errors (HTTP 200, code=500)​

{
"code": 500,
"msg": "PERMISSION_DENIED",
"data": null
}
msg error codeDescription and troubleshooting guidance
PERMISSION_DENIEDThe app state is invalid (disabled, unpublished, or deleted)
SERVER_ERRORInternal server error; retry later

Multilingual call examples​

The following examples run on the server; never send app secrets or app tokens to a client.

Shell​

curl -sS -X GET "https://{gateway_host}/open/v1/enterprise/info" \
-H "Authorization: Bearer access-token-xxx" \\\n -H "Content-Type: application/json" \

PHP​

<?php
// Production code should check the HTTP status and response body before mapping business errors.
$handle = curl_init('https://{gateway_host}/open/v1/enterprise/info');
curl_setopt_array($handle, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['Authorization: Bearer access-token-xxx', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => null,
CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($handle);
curl_close($handle);

Golang​

package main

import (
"bytes"
"net/http"
)

func main() {
// Use the token only in a server-side request and follow the API transport contract.
request, _ := http.NewRequest(http.MethodGet, "https://{gateway_host}/open/v1/enterprise/info", nil)
request.Header.Set("Authorization", "Bearer access-token-xxx")
request.Header.Set("Content-Type", "application/json")
response, _ := http.DefaultClient.Do(request)
defer response.Body.Close()
}

C++​

#include <curl/curl.h>

int main() {
// Enable TLS verification and handle HTTP errors in production.
CURL* handle = curl_easy_init();
struct curl_slist* headers = nullptr;
headers = curl_slist_append(headers, "Authorization: Bearer access-token-xxx");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(handle, CURLOPT_URL, "https://{gateway_host}/open/v1/enterprise/info");
curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(handle, CURLOPT_POSTFIELDS, nullptr);
const CURLcode result = curl_easy_perform(handle);
curl_slist_free_all(headers);
curl_easy_cleanup(handle);
return result == CURLE_OK ? 0 : 1;
}