The call to v2/messages/{id} used to work previously but is not working for me anymore and v2/detail_records?filter[record_type]=messaging&filter[id]={} is not providing message body.
Any idea what can be done in this scenario?
Hey! Can you try the code samples listed at https://developers.telnyx.com/openapi/messaging/tag/Messages/#tag/Messages/operation/retrieveMessage?
For example for a curl should look like this:
curl -i -X GET \
'https://api.telnyx.com/v2/messages/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
If this is what you are using then please share any error or response that you receive so I can take it to the team.
Thanks!
I am getting this response
{ "errors": [ { "code": "40303", "title": "Message not found", "detail": "The message with ID b1966a35-cb39-4f5f-a5fc-d0b57be6b199 was not found.", "meta": { "url": "https://developers.telnyx.com/docs/overview/errors/40303" } } ] }
But when I am using https://api.telnyx.com/v2/detail_records?filter[record_type]=messaging&filter[id]={id}, I am getting a response but without message body.
{"data":[{"carrier_fee":"0","created_at":"2023-04-10T04:00:20Z","mcc":"","fteu":false,"profile_name":"My Telnyx Messaging Profile","updated_at":"2023-04-10T04:00:20Z","rate":"0.0040","on_net":false,"cld":"+15802031170","currency":"USD","id":"767f62cf-b9e7-4643-b66a-18aa9507ac79","direction":"inbound","cli":"69525","mnc":"","cost":"0.0040","tcr_campaign_id":"","autoresponse_type":"","message_type":"SMS","product_name":"long_code","record_type":"message_detail_record","tags":"","sent_at":"2023-04-10T04:00:20Z","country_code":"US","completed_at":"2023-04-10T04:00:20Z","carrier":"","user_id":"d354d61d-24de-44cd-8119-5715e54b563f","delivery_status_failover_url":"","profile_id":"40017efd-d25a-4cc8-a1b7-edb0abfa3c62","parts":1,"delivery_status_webhook_url":"http://telnyxwebhooks.com:8084/a8c4a48f-8276-4124-be08-ca75b9c494a0","source_country_code":"","errors":[],"delivery_status":"","status":"delivered"}],"meta":{"total_pages":1,"total_results":1,"page_number":1,"page_size":20}}
Message bodies are only available for 7 days or so. It looks like you are searching outside of that time frame, correct?
2 People are following this question.
+ | PORTAL |
+ | REQUEST A FEATURE |
+ | API DOCS |
+ | KNOWLEDGE BASE |
+ | HELP |
+ | CONTACT TELNYX |
© Telnyx LLC |