1.Requirement: In my system I create user programmatically using tinode cli, then create p2p topics for two users ,
2.how can I do this?
3.how to get the userid as it shows bigint in users table in database, and can only see in settings-view
for sub we need userid, and then how can we retrive the userid for existing user, as it appears
as if i user resolve, it only shows:
tn> resolve host1_guest2
tn> useradd -P password --name 'Guest One' --cred basic host1_guest2
<= 201 created
tn> resolve host1_guest2
<= 200 ok (fnd)
<= 200 ok (fnd)
<= meta sub fnd
<= 200 ok (fnd)
<=
tn>
no user id
console logs:
I2025/11/05 18:25:09 grpc: session started eS4iaj9pZgw [::1]:53389 3
I2025/11/05 18:25:09 grpc in: hi:{id:"1" user_agent:"Middleman/1.0" ver:"1.0" lang:"EN" background:true} eS4iaj9pZgw
I2025/11/05 18:25:09 grpc in: login:{id:"2" scheme:"basic" secret:"admin01:adminpass"} eS4iaj9pZgw
I2025/11/05 18:25:09 grpc in: acc:{id:"3" user_id:"new" scheme:"basic" secret:"host1_guest15:guestpass_static" desc:{public:"{\"fn\": \"Host1 Guest 15\"}"} cred:{method:"tel" value:"host1_guest15"}} extra:{auth_level:ROOT} eS4iaj9pZgw
I2025/11/05 18:25:10 grpc in: sub:{id:"4" topic:"p2pusr3uMqoCXZEtM" set_query:{sub:{mode:"JRWS"}}} extra:{on_behalf_of:"usrkq_lN_uzkmg"} eS4iaj9pZgw
W2025/11/05 18:25:10 s.dispatch: non-root asigned msg.from eS4iaj9pZgw
On Wednesday, November 5, 2025 at 4:30:28 PM UTC+3 Tinode User wrote:console logs:
I2025/11/05 18:25:09 grpc: session started eS4iaj9pZgw [::1]:53389 3
I2025/11/05 18:25:09 grpc in: hi:{id:"1" user_agent:"Middleman/1.0" ver:"1.0" lang:"EN" background:true} eS4iaj9pZgw
I2025/11/05 18:25:09 grpc in: login:{id:"2" scheme:"basic" secret:"admin01:adminpass"} eS4iaj9pZgw^^^ This user must be the root user for 'on_behalf_of' to workI2025/11/05 18:25:09 grpc in: acc:{id:"3" user_id:"new" scheme:"basic" secret:"host1_guest15:guestpass_static" desc:{public:"{\"fn\": \"Host1 Guest 15\"}"} cred:{method:"tel" value:"host1_guest15"}} extra:{auth_level:ROOT} eS4iaj9pZgwThe extra:{auth_level:ROOT} has no effect. Maybe I should issue an error here.I2025/11/05 18:25:10 grpc in: sub:{id:"4" topic:"p2pusr3uMqoCXZEtM" set_query:{sub:{mode:"JRWS"}}} extra:{on_behalf_of:"usrkq_lN_uzkmg"} eS4iaj9pZgw
W2025/11/05 18:25:10 s.dispatch: non-root asigned msg.from eS4iaj9pZgwadmin01:adminpass is not a root user.
On Wednesday, November 5, 2025 at 7:32:39 PM UTC+5:30 Gene wrote:On Wednesday, November 5, 2025 at 4:30:28 PM UTC+3 Tinode User wrote:console logs:
I2025/11/05 18:25:09 grpc: session started eS4iaj9pZgw [::1]:53389 3
I2025/11/05 18:25:09 grpc in: hi:{id:"1" user_agent:"Middleman/1.0" ver:"1.0" lang:"EN" background:true} eS4iaj9pZgw
I2025/11/05 18:25:09 grpc in: login:{id:"2" scheme:"basic" secret:"admin01:adminpass"} eS4iaj9pZgw^^^ This user must be the root user for 'on_behalf_of' to workI2025/11/05 18:25:09 grpc in: acc:{id:"3" user_id:"new" scheme:"basic" secret:"host1_guest15:guestpass_static" desc:{public:"{\"fn\": \"Host1 Guest 15\"}"} cred:{method:"tel" value:"host1_guest15"}} extra:{auth_level:ROOT} eS4iaj9pZgwThe extra:{auth_level:ROOT} has no effect. Maybe I should issue an error here.I2025/11/05 18:25:10 grpc in: sub:{id:"4" topic:"p2pusr3uMqoCXZEtM" set_query:{sub:{mode:"JRWS"}}} extra:{on_behalf_of:"usrkq_lN_uzkmg"} eS4iaj9pZgw
W2025/11/05 18:25:10 s.dispatch: non-root asigned msg.from eS4iaj9pZgwadmin01:adminpass is not a root user.I have confirmed that it is root user,
but you can also help by telling how to create a root user matching requirement
console logs:
I2025/11/05 18:25:09 grpc: session started eS4iaj9pZgw [::1]:53389 3
I2025/11/05 18:25:09 grpc in: hi:{id:"1" user_agent:"Middleman/1.0" ver:"1.0" lang:"EN" background:true} eS4iaj9pZgw
I2025/11/05 18:25:09 grpc in: login:{id:"2" scheme:"basic" secret:"admin01:adminpass"} eS4iaj9pZgw
I2025/11/05 18:25:09 grpc in: acc:{id:"3" user_id:"new" scheme:"basic" secret:"host1_guest15:guestpass_static" desc:{public:"{\"fn\": \"Host1 Guest 15\"}"} cred:{method:"tel" value:"host1_guest15"}} extra:{auth_level:ROOT} eS4iaj9pZgw
I2025/11/05 18:25:10 grpc in: sub:{id:"4" topic:"p2pusr3uMqoCXZEtM" set_query:{sub:{mode:"JRWS"}}} extra:{on_behalf_of:"usrkq_lN_uzkmg"} eS4iaj9pZgw