HTTP integration, can't manage to receive string

Hello everyone,
I’m trying to send a string from a Lopy to my TTN application, and it works fine, I can see it arrives in my console in bytes. Then, as I want to save it in my database I’m using the HTTP integration to send it to my server. I did manage to store int data from the JSON, but when it comes to storing string I get nothing… Here is the JSON I receive :
{
“app_id”: “elliptika”,
“dev_id”: “lopy4_receiver”,
“hardware_serial”: “70B3D5499AB9C167”,
“port”: 2,
“counter”: 67,
“payload_raw”: “SGVsbG8gd29ybGQ=”,
“metadata”: {
“time”: “2019-09-26T13:30:22.205058336Z”,
“frequency”: 868.1,
“modulation”: “LORA”,
“data_rate”: “SF7BW125”,
“coding_rate”: “4/5”,
“gateways”: [
{
“gtw_id”: “eui-30aea4fffeeca85c”,
“timestamp”: 1684920418,
“time”: “2019-09-26T13:30:21.548157Z”,
“channel”: 0,
“rssi”: -30,
“snr”: 7,
“rf_chain”: 0,
“latitude”: 48.422424,
“longitude”: -4.463054,
“location_source”: “registry”
}
]
},
“downlink_url”: “https://integrations.thethingsnetwork.org/ttn-eu/api/v2/down/elliptika/envoie_de_donnees_aleatoires?key=ttn-account-v2.uzAAfmjJ2fDk1t42CpVvdLklLVs
}
If I try to store “app_id” or even “payload_raw” it doesn’t work. Here is a look at my php code to receive the JSON data with my attempt to decode it :
$donnees = trim(file_get_contents(‘php://input’)); //<-- will capture all posted data
$data = json_decode($donnees,True);
$parametre_counter = $data[‘counter’];
$parametre_payload = base64_decode($data[‘payload_raw’]);

Am I doing something dumb or am I forgetting something maybe ?
Thanks in advance :slight_smile:

A post was merged into an existing topic: Integrations - down / incoming connections refused?