user72632: The below reading data from API:
#include <WiFi.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>

const char* ssid = "****";
const char* pass = "****";

void setup()
{
  Serial.begin(115200);
  WiFi.begin(ssid, pass);
  Serial.print("COnnecting");

  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
  }

  Serial.print("\nIP Address");
  Serial.println(WiFi.localIP());
}

void loop() {
  const char* root_0_id ;
  const char* root_0_Title ;
  if (WiFi.status() == WL_CONNECTED)
  {
    long rnd = random(1, 3);
    HTTPClient client;

    client.begin("https://6336d6c365d1e8ef267481aa.mockapi.io/api/bitmap/images?id=1");
    int httpCode = client.GET();

    if (httpCode > 0) {
      String payload = client.getString();
      Serial.println("\nstatuscode: " + String(httpCode));
      if (payload == "[]")
        Serial.println("\nNOT FOUND");
      else
      {

        DynamicJsonDocument doc(49152);
        DeserializationError error = deserializeJson(doc, payload);
        if (error) {
          Serial.print("deserializeJson() failed: ");
          Serial.println(error.c_str());
          return;
        }

        root_0_id = doc[0]["id"]; // "41"
        root_0_Title = doc[0]["Bitmap"];

        Serial.print("\n\nData : ");
        Serial.println(root_0_Title);

        Serial.println(sizeof(root_0_Title));
        client.end();
        dataReceived = 1;
        delay(10000);
        
      }

    }
    else {
      Serial.println("Error on HTTP request");
    }
  }
}

I need help with parsing the const char* root_0_Title="0x21,0x10,0xfa,0x7a,0xff", to uint8_t[5]={0x21, 0x10, 0xfa, 0x7a, 0xff}?

user37622: you can use strtok (string tokenizer) and strtol (string to long) C functions.
  int count = 0;
  uint8_t bytes[MAX_SIZE]; 
  char* tok = strtok(root_0_Title, ",");
  while (tok != NULL) {
    bytes[count++] = strtol(tok, NULL, 16);
    tok = strtok(NULL, ","); 
  }


72632: <p>The below reading data from API:</p>
<pre><code>#include &lt;WiFi.h&gt;
#include &lt;HTTPClient.h&gt;
#include &lt;ArduinoJson.h&gt;

const char* ssid = &quot;****&quot;;
const char* pass = &quot;****&quot;;

void setup()
{
  Serial.begin(115200);
  WiFi.begin(ssid, pass);
  Serial.print(&quot;COnnecting&quot;);

  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(&quot;.&quot;);
    delay(500);
  }

  Serial.print(&quot;\nIP Address&quot;);
  Serial.println(WiFi.localIP());
}

void loop() {
  const char* root_0_id ;
  const char* root_0_Title ;
  if (WiFi.status() == WL_CONNECTED)
  {
    long rnd = random(1, 3);
    HTTPClient client;

    client.begin(&quot;https://6336d6c365d1e8ef267481aa.mockapi.io/api/bitmap/images?id=1&quot;);
    int httpCode = client.GET();

    if (httpCode &gt; 0) {
      String payload = client.getString();
      Serial.println(&quot;\nstatuscode: &quot; + String(httpCode));
      if (payload == &quot;[]&quot;)
        Serial.println(&quot;\nNOT FOUND&quot;);
      else
      {

        DynamicJsonDocument doc(49152);
        DeserializationError error = deserializeJson(doc, payload);
        if (error) {
          Serial.print(&quot;deserializeJson() failed: &quot;);
          Serial.println(error.c_str());
          return;
        }

        root_0_id = doc[0][&quot;id&quot;]; // &quot;41&quot;
        root_0_Title = doc[0][&quot;Bitmap&quot;];

        Serial.print(&quot;\n\nData : &quot;);
        Serial.println(root_0_Title);

        Serial.println(sizeof(root_0_Title));
        client.end();
        dataReceived = 1;
        delay(10000);
        
      }

    }
    else {
      Serial.println(&quot;Error on HTTP request&quot;);
    }
  }
}
</code></pre>
<p>I need help with parsing the <code>const char* root_0_Title=&quot;0x21,0x10,0xfa,0x7a,0xff&quot;</code>, to uint8_t[5]={0x21, 0x10, 0xfa, 0x7a, 0xff}?</p>
 37622: <p>you can use <a href="https://cplusplus.com/reference/cstring/strtok/" rel="nofollow noreferrer">strtok</a> (string tokenizer) and <a href="https://cplusplus.com/reference/cstdlib/strtol/" rel="nofollow noreferrer">strtol</a> (string to long) C functions.</p>
<pre><code>  int count = 0;
  uint8_t bytes[MAX_SIZE]; 
  char* tok = strtok(root_0_Title, &quot;,&quot;);
  while (tok != NULL) {
    bytes[count++] = strtol(tok, NULL, 16);
    tok = strtok(NULL, &quot;,&quot;); 
  }
</code></pre>
