pinterest / api-quickstart

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

"Create async request for an account analytics report" with test access token #83

Closed emiliajo closed 1 year ago

emiliajo commented 1 year ago

Hi! We are in the process of migrating from v4 to v5. We would like to be able to do a request to "https://api.pinterest.com/v5/ad_accounts/{ad_account_id}/reports" using the test access token, but this does not seem to work. We can retrieve boards via the test access token but we also need to be able to test the retrieval of an async report to make sure our parsing works before migrating to v5. What we need is an example response of all the steps of creating, polling, and fetching a report.

This is not available via the sandbox endpoint either so we are not sure how are we supposed to test this for v5?

davidchaiken commented 1 year ago

Thanks for the question! I'll get back to you with the current state, guidance on where we're going, and potential next steps.

davidchaiken commented 1 year ago

Here's what I found out...

Our v5 endpoint documentation confirms your understanding that async reports are not supported in the sandbox yet. That's what sandbox: disabled means in these sections:

The product development team says that this functionality is on their roadmap. They seem excited to work on supporting async reports in the sandbox, but aren't ready to commit to a release date yet.

On a personal note, I have to say that I feel for you. I needed to test async report code in this repo, and went through a few iterations to figure out how to do the tests. While I understand that testing in production isn't ideal, I think that the async report endpoints are pretty safe because they're read-only. So while you're waiting for support from our side, one option would be to test your code by setting up some very small campaigns in production.

You could also reach out to our support team to see if they have any ideas. To do that, go to https://help.pinterest.com/en/contact, click on Pinterest API and Developer Tools, then Beta: SDK & Sandbox, then fill out the form with information about yourself and this issue. I can't guarantee that they'll be able to help, but over the last day we discussed some ideas that they might try.