Skip to main content
Complete reference for all authentication-related Protocol Buffer messages.

SignIn

Sign in with email and password. Request: auth.SignInResponse: auth.Authorization
email
string
required
User’s email address
password
string
required
User’s password

SignUp

Register a new account. Request: auth.SignUpResponse: auth.Authorization
email
string
Optional email address
password
string
Optional password
name
string
required
Display name for the user

Authorize

Re-authenticate using an existing token. Request: auth.AuthorizeResponse: auth.Authorization
token
string
required
Previously issued authentication token

Authorization

Response for successful authentication.
token
string
JWT or session token for subsequent requests
user
types.User
Complete user object
session_id
fixed64
Snowflake ID of the created session

GetSessions

Retrieve all active sessions. Request: auth.GetSessionsResponse: auth.Sessions No parameters.

Sessions

sessions
Session[]
Array of all active sessions
current
fixed64
Snowflake ID of the current session

Session

id
fixed64
Snowflake session ID
client_id
uint32
Client identifier
device_type
string
Device type (e.g., “web”, “mobile”)
device_version
string
Device OS version
app_name
string
Application name
app_version
string
Application version
last_active
fixed64
Unix timestamp of last activity
country
string
Country code (optional)
region
string
Region/state (optional)

RevokeSessions

Terminate one or more sessions. Request: auth.RevokeSessionsResponse: ()
session_ids
fixed64[]
required
Array of session snowflake IDs to revoke

ResetPassword

Initiate or confirm password reset. Request: auth.ResetPasswordResponse: ()
email
string
required
Email address to send reset code
confirm
ResetPasswordConfirm
Optional confirmation with code and new password

ResetPasswordConfirm

code
string
required
Verification code from email
new_password
string
required
New password to set

VerifyEmail

Verify email address with code. Request: auth.VerifyEmailResponse: ()
email
string
required
Email address to verify
code
string
required
Verification code from email

ResendEmailVerification

Resend verification email. Request: auth.ResendEmailVerificationResponse: ()
email
string
Optional email (uses current user’s email if omitted)

LookupInvite

Preview an invite before accepting. Request: auth.LookupInviteResponse: auth.InvitePreview
code
string
required
Invite code to look up

CreatedInvite

Response when creating invites.
code
string
The generated invite code

InviteType

Enum for invite target types.
UNKNOWN
0
Unknown type
COMMUNITY
1
Invite to a community
GROUP
2
Invite to a group chat
USER
3
Invite to add a user as a friend

InvitePreview

code
string
The invite code
creator_id
fixed64
Snowflake ID of the user who created the invite
target_id
fixed64
Snowflake ID of the target (community/group/user)
target_type
InviteType
Type of the invite target
expires_at
fixed64
Unix timestamp when invite expires (optional)
creator
types.User
User object of invite creator (optional)
target_info
oneof
One of: community (types.Community), chat (types.Group), or user (types.User)

UseInvite

Accept and use an invite. Request: auth.UseInviteResponse: ()
code
string
required
Invite code to accept

InviteList

invites
InvitePreview[]
Array of invite previews

Protocol Definition

syntax = "proto3";

package tangle.client.auth;
import "types.proto";

message SignIn {
  string email = 1;
  string password = 2;
}

message SignUp {
  optional string email = 1;
  optional string password = 2;
  string name = 3;
}

message Authorize { string token = 5; }

message Authorization {
  string token = 1;
  tangle.client.types.User user = 2;
  fixed64 session_id = 3;
}

message GetSessions {}

message Sessions {
  repeated Session sessions = 1;
  fixed64 current = 2;
}

message Session {
  fixed64 id = 1;
  uint32 client_id = 2;
  string device_type = 3;
  string device_version = 4;
  string app_name = 5;
  string app_version = 6;
  fixed64 last_active = 7;
  optional string country = 8;
  optional string region = 9;
}

message RevokeSessions {
  repeated fixed64 session_ids = 1;
}

message ResetPassword {
  message ResetPasswordConfirm {
    string code = 1;
    string new_password = 2;
  }

  string email = 1;
  optional ResetPasswordConfirm confirm = 2;
}

message VerifyEmail {
  string email = 1;
  string code = 2;
}

message ResendEmailVerification { optional string email = 1; }

message LookupInvite { string code = 1; }

message CreatedInvite { string code = 1; }

enum InviteType {
  UNKNOWN = 0;
  COMMUNITY = 1;
  GROUP = 2;
  USER = 3;
}

message InvitePreview {
  string code = 1;
  fixed64 creator_id = 2;
  fixed64 target_id = 3;
  InviteType target_type = 4;
  optional fixed64 expires_at = 5;
  optional tangle.client.types.User creator = 6;

  oneof target_info {
    tangle.client.types.Community community = 7;
    tangle.client.types.Group chat = 8;
    tangle.client.types.User user = 9;
  }
}

message UseInvite { string code = 1; }

message InviteList {
  repeated InvitePreview invites = 1;
}

Build docs developers (and LLMs) love