App Notice API
Used to get the announcement information of a specified application. Supports two request methods. The returned data includes the announcement title, content, and display status.
Request URL GET / POST
http
https://nobase.cn/api/app/noticeRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| appid | string | ✅ Yes | Application unique identifier, obtained from the developer platform |
| signature | string | ✅ Yes | Application signature, obtained from the developer platform |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | number | Status code: 200=Success, others are error codes |
| msg | string | Status description, returns specific reason on error |
| data | object | Announcement data (only returned when code=200) |
| data.title | string | Announcement title |
| data.content | string | Announcement content, supports simple HTML tags |
| data.show | number | Display control: 1=Show, 0=Hide |
Success Response Example
json
{
"code": 200,
"msg": "success",
"data": {
"title": "System Maintenance Notice",
"content": "Dear users, the system will undergo maintenance and may not be available during this period. Thank you for your understanding.",
"show": 1
}
}Code Example
javascript
// Replace with your actual application information
const appid = "your_app_id";
const signature = "your_signature";
// Concatenate request parameters (handle optional token logic)
const params = new URLSearchParams({
appid,
signature
});
// Initiate request and process response
const requestUrl = `https://nobase.cn/api/app/notice?${params.toString()}`;
fetch(requestUrl)
.then(response => {
if (!response.ok) throw new Error(`HTTP Error: ${response.status}`);
return response.json();
})
.then(res => {
// Only process announcement when status code is 200 and show=1
if (res.code === 200 && res.data?.show === 1) {
console.log("Announcement Title:", res.data.title);
console.log("Announcement Content:", res.data.content);
} else {
console.log("No available announcement or insufficient permissions");
}
})
.catch(error => console.error("Request failed:", error));python
import requests
# Configuration parameters
appid = "your_app_id"
signature = "your_signature"
url = "https://nobase.cn/api/app/notice"
# Construct request parameters (handle optional token logic)
params = {
"appid": appid,
"signature": signature
}
# Initiate GET request
try:
response = requests.get(
url=url,
params=params,
timeout=5 # Set 5 second timeout
)
response.raise_for_status() # Automatically raise HTTP errors
res_data = response.json()
if res_data["code"] == 200 and res_data["data"]["show"] == 1:
print(f"Announcement Title: {res_data['data']['title']}")
print(f"Announcement Content: {res_data['data']['content']}")
else:
print("No available announcement or insufficient permissions")
except requests.exceptions.RequestException as e:
print(f"Request failed: {e}")Error Codes
| Status Code | Description | Solution |
|---|---|---|
| 200 | Request successful | - |
| 400 | Parameter error | Check if appid and signature are correct |
| 404 | Application does not exist | Check if appid is correct |
| 500 | Server error | Please contact technical support |
Precautions
- Signature Validity: The signature is bound to appid. Please ensure obtaining the correct signature from the backend.
- Announcement Status: It is recommended to first check the
showfield. Only display the announcement when its value is 1. - Content Security: The announcement content supports HTML tags. Please ensure the content is secure to avoid XSS attacks.

