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.
179 lines
5.2 KiB
179 lines
5.2 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",
|
|
"consumes": [
|
|
"*/*"
|
|
],
|
|
"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",
|
|
"consumes": [
|
|
"*/*"
|
|
],
|
|
"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": [
|
|
"*/*"
|
|
],
|
|
"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": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/whatsapp/logout": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Make Device Logout from WhatsApp Multi-Device",
|
|
"consumes": [
|
|
"*/*"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"WhatsApp"
|
|
],
|
|
"summary": "Logout Device from WhatsApp Multi-Device",
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/whatsapp/send/text": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Make Device Logout from WhatsApp Multi-Device",
|
|
"consumes": [
|
|
"*/*"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"WhatsApp"
|
|
],
|
|
"summary": "Logout Device from WhatsApp Multi-Device",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Destination Phone Number",
|
|
"name": "msisdn",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Text Message Content",
|
|
"name": "message",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"BasicAuth": {
|
|
"type": "basic"
|
|
},
|
|
"BearerAuth": {
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
}
|