Reading data from Firebase to esp32 using uID

Good day I am trying to read data from realtime Database in firebase but my code gives permission denied.I am able to authenticate the esp32 and sign it in to firebase and post data to the database my problem is when I try to read data from the database.This is the code block that is supposed to retreive the data.

I want to retreive the depth from the database .

Uid
Devices
device ID
-depth

void getValues()
{
  if (Firebase.ready())
  {
if (Firebase.RTDB.getString(&fbdo,uid +"/Devices/" + deviceID + "/depth")) 
{
  if (fbdo.dataType() == "string") 
  {
   depth= fbdo.stringData();
    Serial.println(depth);
  }
}
else 
{
  Serial.println(fbdo.errorReason());
}

  }
  else 
{
  Serial.println(fbdo.errorReason());
}
}

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