V
V
Vladimir2022-02-25 15:26:21
API
Vladimir, 2022-02-25 15:26:21

How to send text via telegram link with line break?

I can send text, but without line breaks:

void SendMSG(string message) {
    string URL = "https://api.telegram.org/bot"+TOKEN+"/sendMessage?chat_id="+CHAT_ID+"&text="+message;

    CURL* curl = curl_easy_init();

    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_easy_setopt(curl, CURLOPT_URL, URL.c_str());

    curl_easy_perform(curl);
    curl_easy_cleanup(curl);
};

But how can I move the line by this link? "\n" doesn't work...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2022-02-25
@knizymozf

The answer is in the comments!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question