v6 documentation is incomplete, want to contribute?

Update Invite Message

Updates a single Invite Message and then returns a list of all of them. Admin Credentials are required to update messages of other users!

Updating a message automatically sets the cooldown timer to 60 minutes. Trying to edit a message before the cooldown timer expires results in a 429 "Too Fast Error".

Message type refers to a different collection of messages, used during different types of responses.

  • message = Message during a normal invite
  • response = Message when replying to a message
  • request = Message when requesting an invite
  • requestResponse = Message when replying to a request for invite

Requests made through this page are proxied through an intermediary server due to Cross-Origin Resource Sharing restrictions.

PUT
/message/{userId}/{messageType}/{slot}
auth<token>

Auth Token via Cookie

In: cookie

Path Parameters

userIdstring

Must be a valid user ID.

messageTypeInviteMessageType

The type of message to fetch, must be a valid InviteMessageType.

Default"message"
Value in"message" | "response" | "request" | "requestResponse"
slotinteger

The message slot to fetch of a given message type.

Range0 <= value <= 11

Message of what to set the invite message to.

messagestring

Response Body

curl -X PUT "https://api.vrchat.cloud/api/1/message/string/message/11" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "string"
  }'
const body = JSON.stringify({
  "message": "string"
})

fetch("https://api.vrchat.cloud/api/1/message/string/message/11", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://api.vrchat.cloud/api/1/message/string/message/11"
  body := strings.NewReader(`{
    "message": "string"
  }`)
  req, _ := http.NewRequest("PUT", 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/message/string/message/11"
body = {
  "message": "string"
}
response = requests.request("PUT", 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("""{
  "message": "string"
}""");
HttpClient client = HttpClient.newBuilder()
  .connectTimeout(Duration.ofSeconds(10))
  .build();

HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
  .uri(URI.create("https://api.vrchat.cloud/api/1/message/string/message/11"))
  .header("Content-Type", "application/json")
  .PUT(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("""
{
  "message": "string"
}
""", Encoding.UTF8, "application/json");

var client = new HttpClient();
var response = await client.PutAsync("https://api.vrchat.cloud/api/1/message/string/message/11", body);
var responseBody = await response.Content.ReadAsStringAsync();
[
  {
    "canBeUpdated": true,
    "id": "invm_24a1c14d-5e24-48e5-90e3-c3f712420ffa",
    "message": "string",
    "messageType": "message",
    "remainingCooldownMinutes": 0,
    "slot": 11,
    "updatedAt": "2019-08-24T14:15:22Z"
  }
]

{
  "error": {
    "message": "Really? A negative slot? Tsk-tsk․․․",
    "status_code": 400
  }
}

{
  "error": {
    "message": "You are not authorized to perform that action.",
    "status_code": 401
  }
}

{
  "error": {
    "message": "Please wait 60 more minutes until you try again․",
    "status_code": 429
  }
}