Create Group Announcement
Creates an Announcement for a Group. Warning: This will also remove all announcements. To make proper announcements, use the posts endpoint instead
Requests made through this page are proxied through an intermediary server due to Cross-Origin Resource Sharing restrictions.
auth<token>
Auth Token via Cookie
In: cookie
Path Parameters
groupIdstring
Must be a valid group ID.
titlestring
Announcement title
Length
1 <= length
text?string
Announcement text
Length
1 <= length
imageId?FileID
sendNotification?boolean
Send notification to group members.
Default
false
Response Body
curl -X POST "https://api.vrchat.cloud/api/1/groups/grp_00000000-0000-0000-0000-000000000000/announcement" \
-H "Content-Type: application/json" \
-d '{
"title": "Event is starting soon!"
}'
const body = JSON.stringify({
"title": "Event is starting soon!"
})
fetch("https://api.vrchat.cloud/api/1/groups/grp_00000000-0000-0000-0000-000000000000/announcement", {
body
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.vrchat.cloud/api/1/groups/grp_00000000-0000-0000-0000-000000000000/announcement"
body := strings.NewReader(`{
"title": "Event is starting soon!"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://api.vrchat.cloud/api/1/groups/grp_00000000-0000-0000-0000-000000000000/announcement"
body = {
"title": "Event is starting soon!"
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.net.http.HttpRequest.BodyPublishers;
var body = BodyPublishers.ofString("""{
"title": "Event is starting soon!"
}""");
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("https://api.vrchat.cloud/api/1/groups/grp_00000000-0000-0000-0000-000000000000/announcement"))
.header("Content-Type", "application/json")
.POST(body)
.build();
try {
HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Response body: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;
var body = new StringContent("""
{
"title": "Event is starting soon!"
}
""", Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.PostAsync("https://api.vrchat.cloud/api/1/groups/grp_00000000-0000-0000-0000-000000000000/announcement", body);
var responseBody = await response.Content.ReadAsStringAsync();
{
"id": "gpos_71a7ff59-112c-4e78-a990-c7cc650776e5",
"groupId": "grp_71a7ff59-112c-4e78-a990-c7cc650776e5",
"authorId": "usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469",
"title": "string",
"text": "string",
"imageId": "file_ce35d830-e20a-4df0-a6d4-5aaef4508044",
"imageUrl": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
{
"error": {
"message": "\"Missing Credentials\"",
"status_code": 401
}
}
{
"error": {
"message": "Can't find groupǃ",
"status_code": 404
}
}