We just did a bunch of fixes and reimplemented the calls as you outlined above. We were previously doing the creation through the python twitter ads sdk and think we’ve isolated the issue.
When you upload smaller tailored audience files <1MB (as we were in tests), the TON API performs a non-chunked upload. But larger audiences >1MB are performed via the chunked method. What was happening (we think) is that the location returned by the TON API chunked upload had extra parameters attached (?resumable=true etc).
When this location was being passed to the POST tailored_audience_changes call, we were getting INVALID_PARAMETER, input_file_path errors as seen here:
This error, it would appear, was not being handled properly at our end. And our tests were being run with smaller audiences so we were missing it in a lot of cases. But we think we’ve fixed it. So far, what has seemed to work is stripping out these params and then sending the input_file_path. The 4 most recent attempts have uploaded and been processed successfully.
Thanks for the prompt help!