func (api *API) GetUserProfiles(userMIDs []string) (*UserProfiles, error) {
	mids := strings.Join(userMIDs, ",")
	req, err := http.NewRequest("GET", baseEndPoint+"/v1/profiles?mids="+url.QueryEscape(mids), nil)
	if err != nil {
		return nil, err
	}
	req.Header.Add("Content-Type", "application/json; charset=UTF-8")
	req.Header.Add("X-Line-ChannelID", api.channelID)
	req.Header.Add("X-Line-ChannelSecret", api.channelSecret)
	req.Header.Add("X-Line-Trusted-User-With-ACL", api.mID)
	client := &http.Client{
		Timeout: time.Duration(30 * time.Second),
	}
	if api.proxyURL != nil {
		client.Transport = &http.Transport{Proxy: http.ProxyURL(api.proxyURL)}
	}
	res, err := client.Do(req)
	if err != nil {
		return nil, err
	}
	defer res.Body.Close()
	body, err := ioutil.ReadAll(res.Body)
	if err != nil {
		return nil, err
	}
	var result UserProfiles
	err = json.Unmarshal(body, &result)
	if err != nil {
		return nil, err
	}
	api.Logger.Print("Response: ", result)
	return &result, nil
}
GetUserProfiles obtains profiles of users
package line
import (
	"bytes"
	"encoding/json"
	"errors"
	"io"
	"io/ioutil"
	"log"
	"net/http"
	"net/url"
	"os"
	"strings"
	"time"
)
type ReceivedMessage struct {
	Results []Result `json:"result"`
}
type Result struct {
	ID          string   `json:"id"`
	From        string   `json:"from"`
	FromChannel int      `json:"fromChannel"`
	To          []string `json:"to"`
	ToChannel   int      `json:"toChannel"`
	EventType   string   `json:"eventType"`
	Content     Content  `json:"content"`
}
type SendingMessage struct {
	To        []string `json:"to"`
	ToChannel int      `json:"toChannel"`
	EventType string   `json:"eventType"`
	Content   Content  `json:"content"`
}
type Content struct {
	ID             string          `json:"id"`
	ContentType    int             `json:"contentType"`
	From           string          `json:"from"`
	CreatedTime    int             `json:"createdTime"`
	To             []string        `json:"to"`
	ToType         int             `json:"toType"`
	ConentMetadata ContentMetadata `json:"contentMetadata"`
	Text           string          `json:"text"`
	Location       Location        `json:"location"`
}
const (
	ContentTypeText int = 1 + iota
	ContentTypeImage
	ContentTypeVideo
	ContentTypeAudio
	ContentTypeUndefined5
	ContentTypeUndefined6
	ContentTypeLocation
	ContentTypeSticker
	ContentTypeUndefined9
	ContentTypeContact
)
type Location struct {
	Title     string `json:"title"`
	Address   string `json:"address"`
	Latitude  int    `json:"latitude"`
	Longitude int    `json:"Longitude"`
}
type ContentMetadata struct {
	STKPKGID    string `json:"STKPKGID"`
	STKID       string `json:"STKID"`
	STKVER      string `json:"STKVER"`
	STKTXT      string `json:"STKTXT"`
	Mid         string `json:"mid"`
	DisplayName string `json:"displayName"`
}
type Response struct {
	Failed    []interface{} `json:"failed"`
	MessageID string        `json:"messageId"`
	Timestamp float64       `json:"timestamp"`
	Version   int           `json:"version"`
}
type UserProfiles struct {
	Contacts []UserProfile `json:"contacts"`
	Count    int           `json:"count"`
	Total    int           `json:"total"`
	Start    int           `json:"start"`
	Display  int           `json:"display"`
}
type UserProfile struct {
	DisplayName   string `json:"displayName"`
	Mid           string `json:"mid"`
	PictureURL    string `json:"pictureUrl"`
	StatusMessage string `json:"statusMessage"`
}
const (
	baseEndPoint     = "https://trialbot-api.line.me"
	defaultToChannel = 1383378250
	defaultEventType = "138311608800106203"
)
type API struct {
	channelID     string
	channelSecret string
	mID           string
	proxyURL      *url.URL
	Logger        *log.Logger
	Debug         bool
}
func New(channelID string, channelSecret string, mid string) *API {
	return &API{
		channelID:     channelID,
		channelSecret: channelSecret,
		mID:           mid,
		Logger:        log.New(os.Stderr, "line-bot-api", 0),
		Debug:         false,
	}
}
func (api *API) DecodeMessage(body io.Reader) (*ReceivedMessage, error) {
	var m ReceivedMessage
	b, err := ioutil.ReadAll(body)
	if err != nil {
		return nil, err
	}
	if api.Debug {
		api.Logger.Println("RecievedMessage Body:", string(b))
	}
	err = json.Unmarshal(b, &m)
	if err != nil {
		return nil, err
	}
	return &m, nil
}
func (api *API) SetProxy(proxyURL string) error {
	var err error
	api.proxyURL, err = url.Parse(proxyURL)
	return err
}
func (api *API) SendMessage(to []string, text string) error {
	m := &SendingMessage{
		To:        to,
		ToChannel: defaultToChannel,
		EventType: defaultEventType,
		Content: Content{
			ContentType: 1,
			ToType:      1,
			Text:        text,
		},
	}
	b, err := json.Marshal(m)
	if err != nil {
		return err
	}
	if len(b) > 8192 {
		return errors.New("The size of API request is too long (over 8192 bytes).")
	}
	req, err := http.NewRequest("POST", baseEndPoint+"/v1/events", bytes.NewBuffer(b))
	if err != nil {
		return err
	}
	req.Header.Add("Content-Type", "application/json; charset=UTF-8")
	req.Header.Add("X-Line-ChannelID", api.channelID)
	req.Header.Add("X-Line-ChannelSecret", api.channelSecret)
	req.Header.Add("X-Line-Trusted-User-With-ACL", api.mID)
	client := &http.Client{
		Timeout: time.Duration(30 * time.Second),
	}
	if api.proxyURL != nil {
		client.Transport = &http.Transport{Proxy: http.ProxyURL(api.proxyURL)}
	}
	res, err := client.Do(req)
	if err != nil {
		return err
	}
	defer res.Body.Close()
	body, err := ioutil.ReadAll(res.Body)
	if err != nil {
		return err
	}
	var result map[string]interface{}
	err = json.Unmarshal(body, &result)
	if err != nil {
		return err
	}
	api.Logger.Print("Response: ", result)
	return nil
}