Java 如何通过苹果搜索广告API创建活动
我正试图通过苹果搜索广告API创建活动。所以我用Java 如何通过苹果搜索广告API创建活动,java,python-2.7,sh,Java,Python 2.7,Sh,我正试图通过苹果搜索广告API创建活动。所以我用 curl -X POST https://api.searchads.apple.com/api/v1/campaigns \ --cert path/XXXX.p12 \ --pass **** \ -H "Authorization: orgId=xxxx" \ -d '{"budgetAmount":{"currency":"USD","amount": 50.0},"name": "weixinCampagin", "adamId":"
curl -X POST https://api.searchads.apple.com/api/v1/campaigns \
--cert path/XXXX.p12 \
--pass **** \
-H "Authorization: orgId=xxxx" \
-d '{"budgetAmount":{"currency":"USD","amount": 50.0},"name": "weixinCampagin", "adamId":"414478124","adGroups": [{"name": "weixinCampaginAdGroup","startTime":"2017-03-17 00:00:00","defaultCpcBid": {"amount": 1,"currency":"USD"},"storeFronts": ["US"]}]}'
我收到以下错误消息:
{"data":null,"pagination":null,"error":{"errors":[{"messageCode":"INVALID_ATTRIBUTE_TYPE","message":"This is an invalid request. At least one field format is not readable by the system.","field":"Line#:1 Column#:50"}]}}
我已经尝试过很多次了,但仍然不起作用。有聪明人能帮我吗
提前谢谢 我认为您需要指定发送的是json对象
curl \
--cert ./<FILENAME>.p12 \
--pass <PASSWORD> \
-H "Authorization: orgId=<ORG_ID>" \
-H "Content-Type: application/json" \
-d "<CAMPAIGN_DATA_FILE>.json" \
-X POST "https://api.searchads.apple.com/api/v1/campaigns"
curl\
--证书/第12页\
--通过\
-H“授权:组织ID=”\
-H“内容类型:应用程序/json”\
-d“.json”\
-X邮政“https://api.searchads.apple.com/api/v1/campaigns"
除了内容类型标题,
金额需要采用字符串格式
'{"budgetAmount":{"currency":"USD","amount": "50.0"},"name": "weixinCampagin", "adamId":"414478124","adGroups": [{"name": "weixinCampaginAdGroup","startTime":"2017-03-17 00:00:00","defaultCpcBid": {"amount": "1","currency":"USD"},"storeFronts": ["US"]}]}'
在
该示例还将字符串用于金额项目