String URL GET request (SOLVED)

Hi my people

I'm testing sending messages to a contact list

I am using GET request with http client

I created a String phone

How do I put this String in place of the number within the URL

http.begin("https://api.test-api.com/send?receiver=+5521987xxxxxx4&msgtext=TEST&token=3v3o92addwrLlqTvBw4y&mediaurl=https://infinityfree.com/s/v8ozl8pc85aa4i8/testmessenger.jpg");

?receiver = pass on to assume the value of the String phone. Like this:

receiver = phone;

I solved it like this:

String urlinicio = "https:// to the beginning of the phone";

String phone;

String urlfim = "from the end of the phone to the end of the entire url";

Then I did:

String url = urlinicio + phone + urlfim;

It worked out.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.