## Go Whatsapp API Multi Device Version
### Required (without docker)
- Mac OS:
- `brew install vips`
- `export CGO_CFLAGS_ALLOW="-Xpreprocessor"`
- Linux:
- `sudo apt update`
- `sudo apt install libvips-dev`
- Windows (not recomended, prefer using [WSL](https://docs.microsoft.com/en-us/windows/wsl/install)):
- install vips library, or you can check here https://www.libvips.org/install.html
- add to [environment variable](https://www.google.com/search?q=windows+add+to+environment+path)
### How to use
#### Basic
1. Clone this repo `git clone https://github.com/aldinokemal/go-whatsapp-web-multi-device`
2. open via cmd/terminal
3. run `cd src`
4. run `go run main.go`
5. open `http://localhost:3000`
#### Docker (you don't need to install in required)
1. Clone this repo `git clone https://github.com/aldinokemal/go-whatsapp-web-multi-device`
2. open via cmd/terminal
3. run `docker-compose up -d --build`
4. open `http://localhost:3000`
## Production Mode (without config)
- `docker run --publish 3000:3000 --restart=always aldinokemal2104/go-whatsapp-web-multidevice`
You can fork or edit this source code !
### Current API
`You can check docs/openapi.yml for detail API`
| Feature | Menu | Method | URL | Payload |
|---------|-------------------------|--------|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ✅ | Login | GET | /app/login | |
| ✅ | Logout | GET | /app/logout | |
| ✅ | Reconnect | GET | /app/reconnect | |
| ✅ | User Info | GET | /user/info |
| Param | Type | Type | Example |
| phone | string | querystring | 6289685024099 |
|
| ✅ | User Avatar | GET | /user/avatar | | Param | Type | Type | Example |
| phone | string | querystring | 6289685024099 |
|
| ✅ | User My Group List | GET | /user/my/groups | |
| ✅ | User My Privacy Setting | GET | /user/my/privacy | |
| ✅ | Send Message (Text) | POST | /send/message | | Param | Data Type | Type | Example |
| phone | string | form-data | 6289685024099 |
| message | string | form-data | Hello guys this is testing |
| type | string (user/group) | form-data | user |
|
| ✅ | Send Message (Image) | POST | /send/image | | Param | Type | Type | Example |
| phone | string | form-data | 6289685024099 |
| caption | string | form-data | Hello guys this is caption |
| view_once | bool | form-data | false |
| image | binary | form-data | image/jpg,image/jpeg,image/png |
| type | string (user/group) | form-data | user |
|
| ✅ | Send Message (File) | POST | /send/file | | Param | Type | Type | Example |
|---|
| phone | string | form-data | 6289685024099 |
| file | binary | form-data | any (max: 10MB) |
| type | string (user/group) | form-data | user |
|
| ❌ | Send Message (Video) | POST | /send/video | | Param | Type | Type | Example |
|---|
| phone | string | form-data | 6289685024099 |
| video | binary | form-data | mp4/avi/mkv |
| type | string (user/group) | form-data | user |
|
```
✅ = Available
❌ = Not Available Yet
```
### App User Interface
1. Homepage 
2. Login 
3. Send Message 
4. Send Image 
5. Send File 
6. User Info 
6. User Avatar 
7. User Privacy 
8. User Group 
### Mac OS NOTE
- Please do this if you have an error (invalid flag in pkg-config --cflags: -Xpreprocessor)
`export CGO_CFLAGS_ALLOW="-Xpreprocessor"`