ScruffR and Adam42,
Thanks for your prompt reply and I apologize for my tardy reply.
Again, I can get the expected result from the Particle.Function when I call it from the CLI or the Particle App.
When I call the function from outside the Particle ecosystem using Postman, I do not get the expected results.
Here is the request sent by Postman


POST https://api.particle.io/v1/devices/e00xxxxxxxxxxxxxxxxx674/reports?access_token=fecxxxxxxxxxxxxxx4fb&arg=noonRpt
<—- I’ve tried it with args as well
Here is the code in my program
// *************************************************************
In Setup():
Particle.function ("reports",reports); <—— Particle function call in response to POST request
Loop(
Do stuff
)
****************************************
int reports (String command){ <—- function called by *reports* in the Particle.function call
if (command == "noonRpt"){ <—— function identified by the *arg* in the POST request
noonRpt ();
}
if (command == "Fix"){
Fix ();
}
if (command == "boatStatus"){
boatStatus ();
}
return 7; <—- Note the return number
}
********************************************
int noonRpt (void) { <—- the function called by the function *reports*
convertDataForSMS();
strcpy (smsTxt, boatName); strcat (smsTxt, "\n");
strcat (smsTxt, Time.format(TIME_FORMAT_ISO8601_FULL));
strcat (smsTxt, "\nLat, Long\n");
strcat (smsTxt, strLat);
strcat (smsTxt, ", ");
strcat (smsTxt, strLong);
//strcat (smsTxt, "\nAccelerometer Vector:\n Mag: ");
//strcat (smsTxt, vectorMagnitude);
//strcat (smsTxt, " m/sec/sec\n");
//strcat (smsTxt, " Direction: ");
//strcat (smsTxt, vectorDirection);
//strcat (smsTxt, " *Rel.\n");
strcat (smsTxt, "\nSystem Voltage: ");
strcat (smsTxt, voltTxt);
strcat (smsTxt, " VDC\nTemp: ");
strcat (smsTxt, strTemp);
strcat (smsTxt, " *F\nHumidity: ");
strcat (smsTxt, strHumidity);
strcat (smsTxt, " %\nFence active: ");
strcat (smsTxt, charFenceActive);
Particle.publish ("reports", smsTxt ,PRIVATE); <—- A Webhooks respond to this to send a SMS request to twilio.
//strcat (smsTxt, "\x1A");
//strcat (smsTxt, "\x0D");
// startSMS();
//delay (500);
return 0;
}
This is the Particle Boron’s response to Postman:
"id": "e00fcexxxxxxxxxxxxxx2674",
"last_app": "",
"connected": true,
"return_value": 7 <— Note number returned
}
When I call the noonRpt function via the Particle CLI or through the Particle app, the function, the Webhook and Twilio work perfectly. This leads me to believe that I am not structuring the arg portion of the Postman entry correctly.
Thanks for your help.
Steve