Do It Yourself
You can make a Wechaty Puppet Service easily from any Wechaty Puppet Providers.
You can build a Wechaty Puppet Service by yourself with any Wechaty Puppet Providers.
We have a easy to use docker image which works out-of-the-box.
We need to choice which Wechaty Puppet Provider we want to use by setting the
WECHATY_PUPPET environment variable.
For example, you can choose wechaty-puppet-padlocal by setting
WECHATY_PUPPET=wechaty-puppet-padlocal, add an additional PadLocal token
WECHATY_PUPPET_PADLOCAL_TOKEN=puppet_padlocal__TOKEN__ which is required by PadLocal.
Wechaty Puppet Providers
Learn all Wechaty Puppet Providers
You need to set all environment variables which requires from a specific provider.
You can Generate a new UUIDv4 online, use this new UUIDv4 as your token.
Your new token MUST different to any existing tokens in our system. (or they will conflict!)
The port for your Wechaty Puppet Service need to be specified. Make sure it's free on your server.
- The server IP must be public on the internet
- the port must be public accessible on the internet
verbose log message output for easy debugging.
More options are:
silly: all debug messages will be outputed
verbose: recommended debug level
info: disable debug messages
warning: only warning message
silence: no log message
After finish config all the above settings, start the token gate server with the following docker command:
Privileged mode is for using host networking to simplify the docker arguments.
If you want to remove the
--privileged, you need to add:
-p $WECHATY_PUPPET_SERVER_PORT:$WECHATY_PUPPET_SERVER_PORTfor Linux & Mac
-p %WECHATY_PUPPET_SERVER_PORT%:%WECHATY_PUPPET_SERVER_PORT%for Windows
wait for token gateway getting full started
The docker command in the previous step might need some time to getting fully started.
Wait and read the docker container log messages carefully to make sure the server has been started before continue this step.
Check your TOKEN availability by visiting
HTTP/200means you are good, the TOKEN is ready to use.
HTTP/404means the TOKEN is not registered successfully.
If you get
HTTP/404, then you need to check the previous steps and troubleshoot which part has problems. If you find anything need to be reported, please feel free to submit an issue at here
Learn more about the TOKEN from Wechaty Puppet Service TOKEN Specification.
Your Wechaty Puppet Service will be ready to service for Polyglot Wechaty!
For use Wechaty Token Gateway with ease, you can copy/paste the following code (with modifications for your need) in your bash shell:
modify before use
We are using PadLocal as the example. Remember to modify
WECHATY_PUPPET_PADLOCAL_TOKEN by replacing
puppet_padlocal__TOKEN__ with yours.
I hope you enjoy it!
- Python Wechaty如何使用PadLocal Puppet Service, Biofer, Feb, 3, 2021
- .NET Wechaty如何使用PadLocal Puppet Service, Darren, Jan 28, 2021
- Using your Puppet PadLocal token with Python, Java, and Go Wechaty wechaty/wechaty#1985
- How to create your own Wechaty Puppet Service Token with the Web Protocol wechaty/wechaty#1986
- Using PadLocal Token with Polyglot Wechaty via Token Gateway wechaty/puppet-services#84
- Wechaty is All You Need: Python, Go, and Java Translation Project wechaty/wechaty#1927
You can join our Gitter network if you aren’t already a member.