You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
396 lines
12 KiB
396 lines
12 KiB
{
|
|
"schemes": [
|
|
"http"
|
|
],
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "This is WhatsApp Multi-Device Implementation in Go REST API",
|
|
"title": "Go WhatsApp Multi-Device REST API",
|
|
"contact": {
|
|
"name": "Dimas Restu Hidayanto",
|
|
"url": "https://github.com/dimaskiddo",
|
|
"email": "drh.dimasrestu@gmail.com"
|
|
},
|
|
"version": "1.x"
|
|
},
|
|
"host": "127.0.0.1:3000",
|
|
"paths": {
|
|
"/api/v1/whatsapp": {
|
|
"get": {
|
|
"description": "Get The Server Status",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Root"
|
|
],
|
|
"summary": "Show The Status of The Server",
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/whatsapp/auth": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BasicAuth": []
|
|
}
|
|
],
|
|
"description": "Get Authentication Token",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Root"
|
|
],
|
|
"summary": "Generate Authentication Token",
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/whatsapp/login": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Get QR Code for WhatsApp Multi-Device Login",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json",
|
|
"text/html"
|
|
],
|
|
"tags": [
|
|
"WhatsApp"
|
|
],
|
|
"summary": "Generate QR Code for WhatsApp Multi-Device Login",
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
"html",
|
|
"json"
|
|
],
|
|
"type": "string",
|
|
"default": "html",
|
|
"description": "Change Output Format in HTML or JSON",
|
|
"name": "output",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/whatsapp/logout": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Make Device Logout from WhatsApp Multi-Device",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"WhatsApp"
|
|
],
|
|
"summary": "Logout Device from WhatsApp Multi-Device",
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/whatsapp/send/audio": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Send Audio Message to Spesific Phone Number",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"WhatsApp"
|
|
],
|
|
"summary": "Send Audio Message",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Destination Phone Number",
|
|
"name": "msisdn",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Audio File",
|
|
"name": "audio",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/whatsapp/send/document": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Send Document Message to Spesific Phone Number",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"WhatsApp"
|
|
],
|
|
"summary": "Send Document Message",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Destination Phone Number",
|
|
"name": "msisdn",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Document File",
|
|
"name": "document",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/whatsapp/send/image": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Send Image Message to Spesific Phone Number",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"WhatsApp"
|
|
],
|
|
"summary": "Send Image Message",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Destination Phone Number",
|
|
"name": "msisdn",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Caption Image Message",
|
|
"name": "caption",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Image File",
|
|
"name": "image",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/whatsapp/send/location": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Send Location Message to Spesific Phone Number",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"WhatsApp"
|
|
],
|
|
"summary": "Send Location Message",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Destination Phone Number",
|
|
"name": "msisdn",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "number",
|
|
"description": "Location Latitude",
|
|
"name": "latitude",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "number",
|
|
"description": "Location Longitude",
|
|
"name": "longitude",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/whatsapp/send/text": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Send Text Message to Spesific Phone Number",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"WhatsApp"
|
|
],
|
|
"summary": "Send Text Message",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Destination Phone Number",
|
|
"name": "msisdn",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Text Message",
|
|
"name": "message",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/whatsapp/send/video": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Send Video Message to Spesific Phone Number",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"WhatsApp"
|
|
],
|
|
"summary": "Send Video Message",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Destination Phone Number",
|
|
"name": "msisdn",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Caption Video Message",
|
|
"name": "caption",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Video File",
|
|
"name": "video",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"BasicAuth": {
|
|
"type": "basic"
|
|
},
|
|
"BearerAuth": {
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
}
|