WeChat integration


#1

The largest chat and mobile app in China, curious why I am not finding much online about this?


#2

Wechat is its own little ecosystem. Its not one any of us are familiar with.

What type of integration could you see happening? Also what types are actually available? Do they have apis/ outbound webhooks?


#3

It’s massive, actually, and as you surely have read, it’s used for everything from booking taxis to ecommerce to paying for stuff, transferring money, accessing bank, etc.

I too knew zip about it until a recent project called for it. Here’s some official documentation in english: http://open.wechat.com/cgi-bin/newreadtemplate?t=overseas_open/docs/oa/getting-started/getting-started#getting-started_getting-started

Unfortunately, WeChat makes it hard to develop for unless you have an “Official Account” as a business, pretty much closing up for anyone outside China.

I’d be happy to contribute back, seeing we might have to roll our own.

Thanks!


#4

Not sure how easy it would be to gain official account.

Though we might be able to get some integrations setup like we do with telegram. Basically community have provided scripts and instructions that let you create a bot with telegram and then hook things up.


#5

Yup seen how to hook with Telegram. I’ll share as we have something to show.


#6

I’d be interested to hear more about this.


#7

@aaron.ogle - maybe https://github.com/RocketChat/Rocket.Chat/issues/7576 can be answered in the course of this thread. My assessment is: “not gonna happen”.

Cheers
Thomas


#8

Gonna refer that ticket here. :smile:

Also renamed title to be more of a request then a question :slight_smile:


#9

Hi, we are going to take a crack at it and make RocketChat as a WeChat-powered app. Please if we have any reference/docs on adding the OAuth integration into it, that’d be super helpful. Will send out a pull request if we managed to get it to work.


#10

Awesome. Good luck! Please keep us updated of your progress.


#11

After fighting against build processes, and deployment issues, we managed to hack the custom OAuth module to support WeChat OAuth.

Didn’t want to raise a pull request to main just yet, but would love to get some pointers on how to properly integrate into RocketChat as a new OAuth method.

Thanks!


#12

Thank you @simon.liang! Core will take a look and comment shortly.

@svdb Can you help to test this?


#13

Hi Simon, you can open the PR to the main project, just put a [WIP] on the title so we can help you finish the work.


#14

I went ahead and opened a [WIP] PR including the existing commits and some new code I wrote:

I’m creating a new class for the WeChat OAuth, so that it can change the behaviour of the login process to include the new popup and the other non-default stuff.