Get Basic Enterprise Information
Read public enterprise information such as the enterprise name and logo.
API information
| Item | Description |
|---|---|
| API name | Get Basic Enterprise Information |
| Permission scope | enterprise.info.read(read basic enterprise information) |
| HTTP method | POST / GET |
| Endpoint | https://{gateway_host}/open/v1/enterprise/info |
| Data format | application/json(for POST) or URL query |
| Authentication | App-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
- The app has been published and enabled under "Internal Apps" in the admin console.
- A valid app-level
access_tokenhas been obtained.
Request parameters
Header
| Header | Required | Description |
|---|---|---|
Authorization | No | Bearer <access_token>,recommended credential transport method; choose it instead of query or form authentication |
Content-Type | No | Send application/json when a POST request uses JSON |
Parameter list
This API has no required business parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
access_token | string | Yes | App-level token(if it is not sent in the Authorization header, it is required) |
targetCorpId | string | No | Compatibility 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"
}
}
| Field | Type | Description |
|---|---|---|
code | integer | Business status code; 200 indicates success |
msg | string | Message; empty on success |
data.name | string | Registered/display name of the enterprise |
data.logo | string | Enterprise logo image URL; omitted when not configured |
Permissions and visibility scope
- Not affected by visibility scope:Basic enterprise information is tenant-wide display data, not restricted by the app's member/department visibility scope.
- 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 status | msg Error code | Description |
|---|---|---|
| 401 | INVALID_TOKEN | The token is missing, expired, revoked, or the app is unavailable |
| 403 | SCOPE_DENIED | The token lacks enterprise.info.read permission |
| 403 | IP_DENIED | The 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 code | Description and troubleshooting guidance |
|---|---|
PERMISSION_DENIED | The app state is invalid (disabled, unpublished, or deleted) |
SERVER_ERROR | Internal 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;
}