All URIs are relative to /api
Method | HTTP request | Description |
---|---|---|
SendAudio | Post /instances/{instance_key}/send/audio | Send raw audio. |
SendButtonMessage | Post /instances/{instance_key}/send/buttons | Send a button message. |
SendButtonWithMedia | Post /instances/{instance_key}/send/button-media | Send a button message with a media header. |
SendContact | Post /instances/{instance_key}/send/contact | Send a contact message. |
SendDocument | Post /instances/{instance_key}/send/document | Send raw document. |
SendGroupInvite | Post /instances/{instance_key}/send/group-invite | Send a group invite message |
SendImage | Post /instances/{instance_key}/send/image | Send raw image. |
SendListMessage | Post /instances/{instance_key}/send/list | Send a List message. |
SendLocation | Post /instances/{instance_key}/send/location | Send a location message. |
SendMediaMessage | Post /instances/{instance_key}/send/media | Send a media message. |
SendPollMessage | Post /instances/{instance_key}/send/poll | Send a Poll message. |
SendTemplate | Post /instances/{instance_key}/send/template | Send a template message. |
SendTemplateWithMedia | Post /instances/{instance_key}/send/template-media | Send a template message with media. |
SendTextMessage | Post /instances/{instance_key}/send/text | Send a text message. |
SendVideo | Post /instances/{instance_key}/send/video | Send raw video. |
UploadMedia | Post /instances/{instance_key}/send/upload | Upload media. |
UploadMediaFromUrl | Post /instances/{instance_key}/send/upload-url | Upload media from url. |
APIResponse SendAudio(ctx, instanceKey).To(to).SendAudioRequest(sendAudioRequest).Caption(caption).Execute()
Send raw audio.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
to := "to_example" // string | The recipient's number
sendAudioRequest := *openapiclient.NewSendAudioRequest("TODO") // SendAudioRequest |
caption := "caption_example" // string | Attached caption (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendAudio(context.Background(), instanceKey).To(to).SendAudioRequest(sendAudioRequest).Caption(caption).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendAudio``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendAudio`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendAudio`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendAudioRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
to | string | The recipient's number | sendAudioRequest | SendAudioRequest | | caption | string | Attached caption |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse SendButtonMessage(ctx, instanceKey).Data(data).Execute()
Send a button message.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
data := *openapiclient.NewButtonMessagePayload() // ButtonMessagePayload | Message data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendButtonMessage(context.Background(), instanceKey).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendButtonMessage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendButtonMessage`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendButtonMessage`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendButtonMessageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | ButtonMessagePayload | Message data |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse SendButtonWithMedia(ctx, instanceKey).Data(data).Execute()
Send a button message with a media header.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
data := *openapiclient.NewButtonMessageWithMediaPayload() // ButtonMessageWithMediaPayload | Message data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendButtonWithMedia(context.Background(), instanceKey).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendButtonWithMedia``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendButtonWithMedia`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendButtonWithMedia`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendButtonWithMediaRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | ButtonMessageWithMediaPayload | Message data |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse SendContact(ctx, instanceKey).Data(data).Execute()
Send a contact message.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
data := *openapiclient.NewContactMessagePayload("To_example", *openapiclient.NewContactMessagePayloadVcard()) // ContactMessagePayload | Message data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendContact(context.Background(), instanceKey).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendContact``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendContact`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendContact`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendContactRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | ContactMessagePayload | Message data |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse SendDocument(ctx, instanceKey).To(to).SendDocumentRequest(sendDocumentRequest).Caption(caption).Execute()
Send raw document.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
to := "to_example" // string | The recipient's number
sendDocumentRequest := *openapiclient.NewSendDocumentRequest("TODO") // SendDocumentRequest |
caption := "caption_example" // string | Attached caption (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendDocument(context.Background(), instanceKey).To(to).SendDocumentRequest(sendDocumentRequest).Caption(caption).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendDocument``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendDocument`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendDocument`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendDocumentRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
to | string | The recipient's number | sendDocumentRequest | SendDocumentRequest | | caption | string | Attached caption |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse SendGroupInvite(ctx, instanceKey).Data(data).Execute()
Send a group invite message
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
data := *openapiclient.NewGroupInviteMessagePayload() // GroupInviteMessagePayload | Message data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendGroupInvite(context.Background(), instanceKey).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendGroupInvite``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendGroupInvite`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendGroupInvite`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendGroupInviteRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | GroupInviteMessagePayload | Message data |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse SendImage(ctx, instanceKey).To(to).UpdateProfilePicRequest(updateProfilePicRequest).Caption(caption).Execute()
Send raw image.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
to := "to_example" // string | The recipient's number
updateProfilePicRequest := *openapiclient.NewUpdateProfilePicRequest("TODO") // UpdateProfilePicRequest |
caption := "caption_example" // string | Attached caption (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendImage(context.Background(), instanceKey).To(to).UpdateProfilePicRequest(updateProfilePicRequest).Caption(caption).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendImage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendImage`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendImage`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendImageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
to | string | The recipient's number | updateProfilePicRequest | UpdateProfilePicRequest | | caption | string | Attached caption |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse SendListMessage(ctx, instanceKey).Data(data).Execute()
Send a List message.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
data := *openapiclient.NewListMessagePayload([]openapiclient.ListSection{*openapiclient.NewListSection([]openapiclient.ListItem{*openapiclient.NewListItem("Title_example")}, "Title_example")}, "To_example") // ListMessagePayload | Message data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendListMessage(context.Background(), instanceKey).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendListMessage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendListMessage`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendListMessage`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendListMessageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | ListMessagePayload | Message data |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse SendLocation(ctx, instanceKey).Data(data).Execute()
Send a location message.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
data := *openapiclient.NewLocationMessagePayload(*openapiclient.NewLocationMessagePayloadLocation(float32(123), float32(123), "Name_example"), "To_example") // LocationMessagePayload | Message data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendLocation(context.Background(), instanceKey).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendLocation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendLocation`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendLocation`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendLocationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | LocationMessagePayload | Message data |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse SendMediaMessage(ctx, instanceKey).Data(data).Execute()
Send a media message.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
data := *openapiclient.NewSendMediaPayload(*openapiclient.NewFileUpload("DirectPath_example", []int32{int32(123)}, int32(123), []int32{int32(123)}, []int32{int32(123)}, "MimeType_example", "Url_example"), "MediaType_example", "To_example") // SendMediaPayload | Message data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendMediaMessage(context.Background(), instanceKey).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendMediaMessage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendMediaMessage`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendMediaMessage`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendMediaMessageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | SendMediaPayload | Message data |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse SendPollMessage(ctx, instanceKey).Data(data).Execute()
Send a Poll message.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
data := *openapiclient.NewPollMessagePayload([]string{"Options_example"}, int32(123), "Title_example", "To_example") // PollMessagePayload | Message data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendPollMessage(context.Background(), instanceKey).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendPollMessage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendPollMessage`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendPollMessage`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendPollMessageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | PollMessagePayload | Message data |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse SendTemplate(ctx, instanceKey).Data(data).Execute()
Send a template message.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
data := *openapiclient.NewTemplateButtonPayload([]openapiclient.TemplateButton{*openapiclient.NewTemplateButton("Title_example", "Type_example")}, "To_example") // TemplateButtonPayload | Message data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendTemplate(context.Background(), instanceKey).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendTemplate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendTemplate`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendTemplate`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendTemplateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | TemplateButtonPayload | Message data |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse SendTemplateWithMedia(ctx, instanceKey).Data(data).Execute()
Send a template message with media.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
data := *openapiclient.NewTemplateButtonWithMediaPayload([]openapiclient.TemplateButton{*openapiclient.NewTemplateButton("Title_example", "Type_example")}, *openapiclient.NewFileUpload("DirectPath_example", []int32{int32(123)}, int32(123), []int32{int32(123)}, []int32{int32(123)}, "MimeType_example", "Url_example"), "To_example") // TemplateButtonWithMediaPayload | Message data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendTemplateWithMedia(context.Background(), instanceKey).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendTemplateWithMedia``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendTemplateWithMedia`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendTemplateWithMedia`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendTemplateWithMediaRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | TemplateButtonWithMediaPayload | Message data |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse SendTextMessage(ctx, instanceKey).Data(data).Execute()
Send a text message.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
data := *openapiclient.NewTextMessage("Text_example", "To_example") // TextMessage | Message data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendTextMessage(context.Background(), instanceKey).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendTextMessage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendTextMessage`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendTextMessage`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendTextMessageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | TextMessage | Message data |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse SendVideo(ctx, instanceKey).To(to).SendVideoRequest(sendVideoRequest).Caption(caption).Execute()
Send raw video.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
to := "to_example" // string | The recipient's number
sendVideoRequest := *openapiclient.NewSendVideoRequest("TODO") // SendVideoRequest |
caption := "caption_example" // string | Attached caption (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.SendVideo(context.Background(), instanceKey).To(to).SendVideoRequest(sendVideoRequest).Caption(caption).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.SendVideo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SendVideo`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.SendVideo`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiSendVideoRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
to | string | The recipient's number | sendVideoRequest | SendVideoRequest | | caption | string | Attached caption |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse UploadMedia(ctx, instanceKey).Type_(type_).UploadMediaRequest(uploadMediaRequest).Execute()
Upload media.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
type_ := "type__example" // string | Media type
uploadMediaRequest := *openapiclient.NewUploadMediaRequest("TODO") // UploadMediaRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.UploadMedia(context.Background(), instanceKey).Type_(type_).UploadMediaRequest(uploadMediaRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.UploadMedia``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UploadMedia`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.UploadMedia`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiUploadMediaRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
type_ | string | Media type | uploadMediaRequest | UploadMediaRequest | |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse UploadMediaFromUrl(ctx, instanceKey).Type_(type_).Data(data).Execute()
Upload media from url.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
type_ := "type__example" // string | Media type
data := *openapiclient.NewUrlMediaUploadPayload() // UrlMediaUploadPayload | Media data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MessageSendingApi.UploadMediaFromUrl(context.Background(), instanceKey).Type_(type_).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MessageSendingApi.UploadMediaFromUrl``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UploadMediaFromUrl`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `MessageSendingApi.UploadMediaFromUrl`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiUploadMediaFromUrlRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
type_ | string | Media type | data | UrlMediaUploadPayload | Media data |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]