> ## Documentation Index
> Fetch the complete documentation index at: https://golang.wapikit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Messaging

```go theme={null}
import "github.com/wapikit/wapi.go/pkg/messaging"
```

<a name="MessagingClient" />

## type MessagingClient

MessagingClient represents a WhatsApp client.

```go theme={null}
type MessagingClient struct {
    Media             manager.MediaManager
    Message           manager.MessageManager
    PhoneNumberId     string
    ApiAccessToken    string
    BusinessAccountId string
    Requester         *request_client.RequestClient
}
```

<a name="MessagingClient.Deregister" />

### func (\*MessagingClient) Deregister

```go theme={null}
func (client *MessagingClient) Deregister() (RegisterResponse, error)
```

<a name="MessagingClient.GetApiAccessToken" />

### func (\*MessagingClient) GetApiAccessToken

```go theme={null}
func (client *MessagingClient) GetApiAccessToken() string
```

<a name="MessagingClient.GetBusinessAccountId" />

### func (\*MessagingClient) GetBusinessAccountId

```go theme={null}
func (client *MessagingClient) GetBusinessAccountId() string
```

<a name="MessagingClient.GetPhoneNumberId" />

### func (\*MessagingClient) GetPhoneNumberId

```go theme={null}
func (client *MessagingClient) GetPhoneNumberId() string
```

GetPhoneNumberId returns the phone number ID associated with the client.

<a name="MessagingClient.Register" />

### func (\*MessagingClient) Register

```go theme={null}
func (client *MessagingClient) Register(pin string) (RegisterResponse, error)
```

this register function is for one time registration of the phone number to enable the usage with WhatsApp Cloud API

<a name="MessagingClient.SetApiAccessToken" />

### func (\*MessagingClient) SetApiAccessToken

```go theme={null}
func (client *MessagingClient) SetApiAccessToken(apiAccessToken string)
```

<a name="MessagingClient.SetPhoneNumberId" />

### func (\*MessagingClient) SetPhoneNumberId

```go theme={null}
func (client *MessagingClient) SetPhoneNumberId(phoneNumberId string)
```

SetPhoneNumberId sets the phone number ID for the client.

<a name="RegisterResponse" />

## type RegisterResponse

```go theme={null}
type RegisterResponse struct {
    Success bool `json:"success"`
}
```
