Click here to Skip to main content
15,356,336 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
trying to send a dm but i failed is there a way to make this work?
it returns 200 status code BUT i does not send the message !
import cloudscraper
import re
import uuid

s = cloudscraper.create_scraper()
def log():
	global headers
	data = {'username': '','e nc_password': '','queryParams': '{}','optIntoOneTap': 'true'}
	csrf = str('csrf_token":"(.*)","viewer"',a).group(1))
	headers = {'x-csrftoken':csrf,'cookie':'csrftoken='+csrf+';'}
	#headers = {'x-csrftoken': csrf,'cookie': 'csrftoken='+csrf+'; sessionid='+s.cookies['sessionid']+';'}
def sendMessage(target_user,msgText,csrf):
    global headers
    target_user = '[[{}]]'.format(','.join([target_user]))
    data = {
        'text': msgText,
        '_uuid': str(uuid.uuid4()),
        '_csrftoken': csrf,
        'recipient_users': target_user,
        '_uid': id
        'action': 'send_item',
        'client_context': str(uuid.uuid4())}

What I have tried:

changing headers variable
trying to connect to websocket in the browser
changing uuid
changing message
Christian Graus 24-Jan-21 21:06pm
have you tried forming a call in postman?
Mr Beast 24-Jan-21 22:18pm
what do you mean can you debug web sockets by postman
Christian Graus 24-Jan-21 22:19pm
If you're making a HTTP call, you can test it there

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900