pinterest / api-quickstart

Code that makes it easy to get started with the Pinterest API.
Apache License 2.0
125 stars 46 forks source link

I created a pin with api v5,But my pinterest doesn't display normally #78

Closed ksiventy closed 2 years ago

ksiventy commented 2 years ago

I created a pin with api v5

url:https://api.pinterest.com/v5/pins response:{"alt_text":null,"board_section_id":"5258814934636085108","board_id":"999658517227244888","description":"Details below ▶ $120.0","title":"Design,shading,Layered file","dominant_color":"#e8d3db","board_owner":{"username":"Pattern_buy"},"parent_pin_id":null,"link":"https://www.patternbuy.com/detail/19993","media":{"media_type":"image","images":{"150x150":{"width":150,"height":150,"url":"https://i.pinimg.com/150x150/91/4b/d7/914bd7ebfe57de602a8c5959f6881814.jpg"},"400x300":{"width":400,"height":300,"url":"https://i.pinimg.com/400x300/91/4b/d7/914bd7ebfe57de602a8c5959f6881814.jpg"},"600x":{"width":600,"height":754,"url":"https://i.pinimg.com/600x/91/4b/d7/914bd7ebfe57de602a8c5959f6881814.jpg"},"1200x":{"width":1200,"height":1508,"url":"https://i.pinimg.com/1200x/91/4b/d7/914bd7ebfe57de602a8c5959f6881814.jpg"},"originals":{"width":1200,"height":1508,"url":"https://i.pinimg.com/originals/91/4b/d7/914bd7ebfe57de602a8c5959f6881814.jpg"}}},"created_at":"2022-10-13T01:40:29","id":"999658448514149467"}

But my pinterest doesn't display normally

https://www.pinterest.com/Pattern_buy/_created/ https://www.pinterest.com/Pattern_buy/test/section-name/

F12 show error https://www.pinterest.com/resource/AnalyticsDynamicToplineMetricsResource/get/?source_url=%2Fbusiness%2Fhub%2F%3Fshow_error%3Dtrue&data=%7B%22options%22%3A%7B%22app_types%22%3A%22all%22%2C%22include_curated%22%3A0%2C%22metric_types%22%3A%22GMV%22%2C%22split_field%22%3A%22NO_SPLIT%22%2C%22user_id%22%3A%22999658585946430453%22%2C%22include_realtime_data%22%3Atrue%2C%22start_date%22%3A%222022-09-13%22%2C%22end_date%22%3A%222022-10-13%22%2C%22start_timestamp%22%3A1663027200%2C%22end_timestamp%22%3A1665627213%2C%22format_metric_type%22%3A%22conversion%22%2C%22currency_code%22%3A%22USD%22%2C%22no_fetch_context_on_resource%22%3Afalse%7D%2C%22context%22%3A%7B%7D%7D&_=1665627213785

"resource_response":{ "error":{ "status":"failure", "http_status":500, "code":12, "message":"Something went wrong on our end. Sorry about that.", "api_error_code":12 }, "data":{ "request_id":"7851434099706715" } },

davidchaiken commented 2 years ago

Thanks for reporting this issues @ksiventy. None of them seem related to the code in this repo, but I'll have a shot at answering. There seem to be three different areas to address:

  1. I think that your application (API client) has "trial" status. Applications with this status create pins that are only visible to the user that created them. So, when a different user looks at the account on www.pinterest.com, they will not see the pins. This restriction is documented here.
  2. The response to the call to AnalyticsDynamicToplineMetricsResource is 401 - Authentication failed. The most likely cause of this issue is that the access token or your app doesn't have the scopes required to call the v3_analytics_metrics_conversion_deltas endpoint.
  3. Our logs indicate that the 500 error that you reported for request_id 7851434099706715 is caused by a bug on our side. We expect to deploy the fix for this bug today or tomorrow.

For official support, please consider submitting a ticket here. Click on "Pinterest API and Developer Tools" and then "API Technical Support."

davidchaiken commented 2 years ago

The fix for the 500 error that I mentioned in my previous comment has been deployed. Please retry the call to v3_get_board_section_pins, and it should work.🤞