Code Monkey home page Code Monkey logo

wa-automate-socket-client-python's People

Contributors

mrodal avatar smashah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

wa-automate-socket-client-python's Issues

errors

I want to buy an API KEY but I wanted to test it first and it doesnt seem to be working,
I rub the code in the README.md i also scanned qr but it showed this error

Traceback (most recent call last):
  File "/home/moha/PycharmProjects/wapy/firsmo.py", line 5, in <module>
    client = SocketClient('http://localhost:8085/', 'secure_api_key')
  File "/home/moha/.local/lib/python3.10/site-packages/wa_automate_socket_client/__init__.py", line 43, in __init__
    self.io.connect(self.url, auth={'apiKey': api_key})
TypeError: Client.connect() got an unexpected keyword argument 'auth'

Error socketio.exceptions.BadNamespaceError: / is not a connected namespace.

Loving this
able to use python to control npx without any env besides nodejs

please share where are the docs for the python client
im having issues setting icon to a group

>>> client.setGroupIconByUrl(g,"https://freesvg.org/img/1534129544.png")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/magic/.local/lib/python3.8/site-packages/wa_automate_socket_client/__init__.py", line 68, in __call__
    return client.io.call(item, {'args': args})
  File "/home/magic/.local/lib/python3.8/site-packages/socketio/client.py", line 468, in call
    self.emit(event, data=data, namespace=namespace,
  File "/home/magic/.local/lib/python3.8/site-packages/socketio/client.py", line 393, in emit
    raise exceptions.BadNamespaceError(
socketio.exceptions.BadNamespaceError: / is not a connected namespace.

Thx a lot! :)

Documentation

Hey! do you have any python docs? could not find them if they exist..

Thanks!

Getting QR to client before connection

As it seems, right now, the connection to the api is only made after Open-WA has finalized everything

This means I cant connect to the client if the session is not active...

What (i think) i need:
I need to be able to connect to the client even if the session is not ready
i need an event every time a qr is recieved
I need a .ready() function from the client to let me know if im connected

Please let me know if theres currently another way to get the (changing) qr (in python)

Thanks a lot!

BTW @smashah This is the best client ever
Thanks so much for your work ๐Ÿ’›

Erorr while trying to send video

this is my code to trying send video from url

curl -X 'POST' \
  'http://localhost:8085/sendFileFromUrl' \
  -H 'accept: */*' \
  -H 'api_key: key' \
  -H 'Content-Type: application/json' \
  -d '{
  "args": {
    "to": "[email protected]",
    "url": "https://example.com/file.mp4",
    "filename": "video.mp4"
  }
}'

this is the error code

{
  "success": false,
  "error": {
    "name": "Error",
    "message": "Please set arguments in request json body, not in params. Evaluation failed: Error: InvalidMediaFileType\n    at h.sendToChat (https://web.whatsapp.com/app.a8429b8147f1b90a2f71.js:72:764642)\n    at pptr://__puppeteer_evaluation_script__:1:214142\n    at async window.<computed>.<computed> [as sendImage] (pptr://__puppeteer_evaluation_script__:1:210399)"
  }
}

thanks

Client Docs ? + License Changed

Hi there,
this is by far the easiest client to use
really enjoying your work

I am getting

โœ– License issue: Expected 1576 but this account is 2000

my original license is of the [now deprecated] python automate, please advise on how to reissue me a new license pls :)

But mostly, where do i see the docs for the python client?
the best i got so far is to check the api-docs which upto now mapped the http request correctly with the client
but would love to see where all these functions are coming from and what parameters they expect
image

Thanks a lot! โค๏ธ

BUG

AFTER I RUN THE CODE WHICH IS THE SIMPLE CODE GIVEN IN THIS REPOSITORY I AM RECIEVING THIS ERROR:

Traceback (most recent call last):
File "/home/moha/PycharmProjects/wapy/firsmo.py", line 5, in
client = SocketClient('http://localhost:8085/', 'secure_api_key')
File "/home/moha/.local/lib/python3.10/site-packages/wa_automate_socket_client/init.py", line 43, in init
self.io.connect(self.url, auth={'apiKey': api_key})
TypeError: Client.connect() got an unexpected keyword argument 'auth'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.