Skip to content
This repository has been archived by the owner on Feb 28, 2025. It is now read-only.

JSON RPC WebSocket API: unsubscribeGroupMessages #27

Open
jac18281828 opened this issue Jan 5, 2024 · 1 comment
Open

JSON RPC WebSocket API: unsubscribeGroupMessages #27

jac18281828 opened this issue Jan 5, 2024 · 1 comment
Labels

Comments

@jac18281828
Copy link
Contributor

jac18281828 commented Jan 5, 2024

JSON RPC WebSocket API Documentation: unsubscribeGroupMessages

Overview

This document describes the JSON RPC WebSocket API for unsubscribing from a conversation.

WebSocket Endpoint

  • URL: wss://protocol.xmtp.com/v1/conversation
  • Protocol: WebSocket

JSON RPC Protocol

This API follows the JSON RPC 2.0 specification. All messages sent and received are expected to be in valid JSON format.

Authentication

To establish a secure WebSocket connection. This api may be public and does not require authentication.

Method

1. see subscribeGroupMessages

2. unsubscribeGroupMessages

Unsubscribes the client from receiving updates for a specific conversation.

  • Parameters:

    • conversationId (string): Unique identifier for the conversation.
  • Response:

    • Success: {"jsonrpc": "2.0", "result": "Unsubscribed from conversation [conversationId]", "id": [requestId]}
    • Error: Standard JSON RPC error format.

Notifications

None

Error Handling

The API uses standard JSON RPC error responses. Common error codes include:

  • -32601: Method not found.
  • -32602: Invalid params.
  • -32603: Internal error.

Examples

Request:

{
  "jsonrpc": "2.0",
  "method": "unsubscribeGroupMessages",
  "params": {
    "conversationId": "0x1234abcd..."
  },
  "id": 1
}

Versioning and Updates

This document describes version 1.0 of the API. Future updates and changes will be communicated as necessary.

@jac18281828 jac18281828 changed the title **JSON RPC WebSocket API Documentation: unsubscribeConversation** JSON RPC WebSocket API: unsubscribeConversation Jan 5, 2024
@jac18281828 jac18281828 changed the title JSON RPC WebSocket API: unsubscribeConversation JSON RPC WebSocket API: unsubscribeConversation Jan 5, 2024
@jac18281828
Copy link
Contributor Author

Reference Implementation: https://github.com/xmtp/xps-conversation-producer

@jac18281828 jac18281828 added the enhancement New feature or request label Jan 5, 2024
@jac18281828 jac18281828 changed the title JSON RPC WebSocket API: unsubscribeConversation JSON RPC WebSocket API: unsubscribeGroupMessages Jan 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant