Issue with Template Analytics API: Invalid Parameter Error for 90-Day Period
1

Hello,

I'm experiencing an issue when attempting to retrieve template analytics data for a 90-day period. According to the documentation, analytics data can be fetched for intervals of up to 90 days. However, when I make a request for this interval, or even slightly less, I receive the following error:

{
  "message": "Invalid parameter",
  "type": "OAuthException",
  "code": 100,
  "error_data": "Start time must be within the query period of the last 90 days.",
  "error_subcode": 4182005,
  "is_transient": false,
  "error_user_title": "Incorrect Start Time",
  "error_user_msg": "Start time must be within the query period of the last 90 days.",
  "fbtrace_id": "##########"
}

Here is the request I'm making:

{business_account_path}/template_analytics?start=1715828400&end=1723604400&granularity=daily&metric_types=cost,clicked,delivered,read,sent&template_ids=#{template_ids}

Where: - 1715828400 = Thursday, May 16, 2024, 3:00:00 AM (start time) - 1723604400 = Wednesday, August 14, 2024, 3:00:00 AM (end time)

Test Date: Thursday, August 15, 2024

Could you please clarify why this error occurs despite the request falling within the 90-day period? Is there an issue with how the start and end times are being calculated, or is there something else I might be overlooking?

Thank you for your assistance.

Gabriel
Posée il y a environ 3 mois