Hello Jose,
Michael here from DCM API Team. Thank you for reaching out to us.
We do have documentation guide on how you can upload media files through API request calls, kindly check here. However, please be informed that we can only respond precisely with regards to use of API or API responses issues. We do have sample client libraries here written in node js that you may use as a reference. However, should the client library not suffice to your use case, we would recommend reaching out directly to the developer's support specialist team as they are the one who maintains our client library and would be more capable of providing a sample in node js that would achieve your use case.
Regards,
|
||||||
Hello Simon,
Michael here from DCM API support team. Thank you for reaching out to us. We appreciate you sharing your inputs as this will help our community should they encounter similar concerns. Looks like the issue has been resolved here, is that correct? Nonetheless, let us know should you have further questions yourself so we can assist you.
Regards,
|
||||||
Hello Michael,
Thank you for reaching out.
Were you trying to upload creative asset as well? If so, we do have documentation guide on how you can Upload Media files through API request calls. Then, you may use the creatives.insert method to create a new creative. We also have samples and libraries for you to use as reference and help you in your implementation. If this does not suffice to your use case, kindly elaborate and give full context of what you are trying to do so we can better assist you.
Regards,
|
||||||
I have poured over these documents trying to get this to work with nodejs and can't seem to follow these documents. I was hoping to find a working example uploading assets to Campaign Manager.
Hello Michael,
Can you confirm if you have checked out our node js sample in samples and libraries? Additionally, we also recommend that you checked out the creativeAssets.insert method shared also by Simon.
With regards to the errors you encountered, kindly ensure that the image type of asset being uploaded is supported and the name of it does not have special characters other than A-Z a-z 0-9 . = - _",
For us to investigate further on that, kindly provide the below information to us privately via "Reply To Author" button.
As a side note, thank you Simon for being active in helping in our community forum.
Hello Michael,
Confirming that we have received your private reply to us. Would you be able to try to change the 'Content-Type':"image/png" to Content-Type: image/jpeg as shown in this example of simple upload? We would also suggest to try a simple file name with no special characters just to narrow down the issue.
Kindly try the above and let us know how it goes. We will raise this to our wider team as necessary when you came back with no success on your end.
Regards,
Hi Derrick,
Thank you for reaching out to us.
Could you confirm if you are indeed having the exact errors encountered by Michael? If yes, below is a workable curl request that our team tested:
"""
curl -H "X-Goog-Upload-Protocol: multipart" -H "multipart/related" -F"metadata=@/usr/local/google/home/test/Desktop/data/upload.txt;type=application/json" -F "image=@/usr/local/google/home/test/Desktop/testAsset.jpeg;type=image/jpeg" https://test.com:0000/upload/dfareporting/v4/userprofiles/000000/creativeAssets/000000/creativeAssets
"""
test:data$ cat upload.txt
{
"assetIdentifier": {
"name": "testAsset.jpeg",
"type": "HTML_IMAGE"
}
}
You may try on your end if it will work for you. Just know that I have replaced some of the private information to test and other details as well as domain name, account id, profile id and asset id for privacy purposes. You may change that accordingly as necessary.
However, if it still does not work for you. We would highly recommend reaching out to developers specialist support (https://github.com/google/google-api-objectivec-client-for-rest/issues) team as they better equipped to provide guidance on this matter.
However, if you are not encountering the same exact error Michael encountered, could you confirm if you already checked out the creativeAssets.insert (https://developers.google.com/doubleclick-advertisers/rest/v4/creativeAssets/insert) method and the documentation guide on how you can Upload Media (https://developers.google.com/doubleclick-advertisers/upload?hl=en) files through API request calls and use the creatives.insert (https://developers.google.com/doubleclick-advertisers/rest/v4/creatives/insert?hl=en) method to create a new creative? If not, I would suggest you consider it first.
Additionally, kindly ensure that the image type of the asset being uploaded is supported and that the name of it does not have special characters other than A-Z a-z 0–9. = - _",
However, for us to investigate further the error you are encountering, kindly provide the below information to us privately via the "Reply To Author" button.
![]() |
DCM API Team |