(organizationsV1)
Returns an unsorted list of all organizations that you are a member of (an accepted membership invite). An organization is uniquely identified by an orgId
.
import { HathoraCloud } from "@hathora/cloud-sdk-typescript";
const hathoraCloud = new HathoraCloud({
hathoraDevToken: "<YOUR_BEARER_TOKEN_HERE>",
appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2",
});
async function run() {
const result = await hathoraCloud.organizationsV1.getOrgs();
// Handle the result
console.log(result)
}
run();
Parameter |
Type |
Required |
Description |
options |
RequestOptions |
➖ |
Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit |
➖ |
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
Promise<components.OrgsPage>
Error Object |
Status Code |
Content Type |
errors.ApiError |
401,404,429 |
application/json |
errors.SDKError |
4xx-5xx |
/ |
import { HathoraCloud } from "@hathora/cloud-sdk-typescript";
const hathoraCloud = new HathoraCloud({
hathoraDevToken: "<YOUR_BEARER_TOKEN_HERE>",
appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2",
});
async function run() {
const result = await hathoraCloud.organizationsV1.inviteUser("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39", {
userEmail: "<value>",
});
// Handle the result
console.log(result)
}
run();
Parameter |
Type |
Required |
Description |
Example |
orgId |
string |
✔️ |
N/A |
[object Object] |
createUserInvite |
components.CreateUserInvite |
✔️ |
N/A |
|
options |
RequestOptions |
➖ |
Used to set various options for making HTTP requests. |
|
options.fetchOptions |
RequestInit |
➖ |
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
|
Promise<components.OrgPermission>
Error Object |
Status Code |
Content Type |
errors.ApiError |
401,422,429 |
application/json |
errors.SDKError |
4xx-5xx |
/ |
import { HathoraCloud } from "@hathora/cloud-sdk-typescript";
const hathoraCloud = new HathoraCloud({
hathoraDevToken: "<YOUR_BEARER_TOKEN_HERE>",
appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2",
});
async function run() {
await hathoraCloud.organizationsV1.rescindInvite("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39", {
userEmail: "<value>",
});
}
run();
Parameter |
Type |
Required |
Description |
Example |
orgId |
string |
✔️ |
N/A |
[object Object] |
rescindUserInvite |
components.RescindUserInvite |
✔️ |
N/A |
|
options |
RequestOptions |
➖ |
Used to set various options for making HTTP requests. |
|
options.fetchOptions |
RequestInit |
➖ |
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
|
Promise<void>
Error Object |
Status Code |
Content Type |
errors.ApiError |
401,404,429,500 |
application/json |
errors.SDKError |
4xx-5xx |
/ |
import { HathoraCloud } from "@hathora/cloud-sdk-typescript";
const hathoraCloud = new HathoraCloud({
hathoraDevToken: "<YOUR_BEARER_TOKEN_HERE>",
appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2",
});
async function run() {
const result = await hathoraCloud.organizationsV1.getOrgPendingInvites("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39");
// Handle the result
console.log(result)
}
run();
Parameter |
Type |
Required |
Description |
Example |
orgId |
string |
✔️ |
N/A |
[object Object] |
options |
RequestOptions |
➖ |
Used to set various options for making HTTP requests. |
|
options.fetchOptions |
RequestInit |
➖ |
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
|
Promise<components.OrgInvitesPage>
Error Object |
Status Code |
Content Type |
errors.ApiError |
401,429 |
application/json |
errors.SDKError |
4xx-5xx |
/ |
import { HathoraCloud } from "@hathora/cloud-sdk-typescript";
const hathoraCloud = new HathoraCloud({
hathoraDevToken: "<YOUR_BEARER_TOKEN_HERE>",
appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2",
});
async function run() {
const result = await hathoraCloud.organizationsV1.getUserPendingInvites();
// Handle the result
console.log(result)
}
run();
Parameter |
Type |
Required |
Description |
options |
RequestOptions |
➖ |
Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit |
➖ |
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
Promise<components.OrgInvitesPage>
Error Object |
Status Code |
Content Type |
errors.ApiError |
401,429 |
application/json |
errors.SDKError |
4xx-5xx |
/ |
import { HathoraCloud } from "@hathora/cloud-sdk-typescript";
const hathoraCloud = new HathoraCloud({
hathoraDevToken: "<YOUR_BEARER_TOKEN_HERE>",
appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2",
});
async function run() {
await hathoraCloud.organizationsV1.acceptInvite("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39");
}
run();
Parameter |
Type |
Required |
Description |
Example |
orgId |
string |
✔️ |
N/A |
[object Object] |
options |
RequestOptions |
➖ |
Used to set various options for making HTTP requests. |
|
options.fetchOptions |
RequestInit |
➖ |
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
|
Promise<void>
Error Object |
Status Code |
Content Type |
errors.ApiError |
401,404,429 |
application/json |
errors.SDKError |
4xx-5xx |
/ |
import { HathoraCloud } from "@hathora/cloud-sdk-typescript";
const hathoraCloud = new HathoraCloud({
hathoraDevToken: "<YOUR_BEARER_TOKEN_HERE>",
appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2",
});
async function run() {
await hathoraCloud.organizationsV1.rejectInvite("org-6f706e83-0ec1-437a-9a46-7d4281eb2f39");
}
run();
Parameter |
Type |
Required |
Description |
Example |
orgId |
string |
✔️ |
N/A |
[object Object] |
options |
RequestOptions |
➖ |
Used to set various options for making HTTP requests. |
|
options.fetchOptions |
RequestInit |
➖ |
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
|
Promise<void>
Error Object |
Status Code |
Content Type |
errors.ApiError |
401,404,429 |
application/json |
errors.SDKError |
4xx-5xx |
/ |