I'm new to REST API and Postman, and I'm looking for a way to include timestamp as a string in the body of a POST request through Postman.
According to Postman docs, there is a dynamic variable {{$timestamp}}that can be used in the request body. However, when I try to use it, I get 400 back from the endpoint to which I go, with the message "garbled data".
Here are some options I've tried:
option 1
[
{
"from_number": "+123456789",
"messages": [
{
"text": "Message at" {{$timestamp}},
"to_number": "+123456789"
}
]
}
]
option 2
[
{
"from_number": "+123456789",
"messages": [
{
"text": "Message at {{$timestamp}}",
"to_number": "+123456789"
}
]
}
]
variation 3
[
{
"from_number": "+123456789",
"messages": [
{
"text": "Message at " + {{$timestamp}},
"to_number": "+123456789"
}
]
}
]
They all returned the same error.
{
"errorMessage": "malformed data",
"error": true
}
source
share