Ads api to create website card return error UNAUTHORIZED_ACCESS

ads
website-card
api

#1

Referencing https://dev.twitter.com/ads/reference/post/accounts/%3Aaccount_id/cards/website, I tried to make an api call to creat a new website card, but got a response with an error -

{
“errors”: [{
“code”: “UNAUTHORIZED_ACCESS”,
“message”: “This request is not properly authenticated”
}],
“request”: {
“params”: {

	}
}

}

Appreciate if someone can tell me why ?


#2

If you share with us your request and not only your response, It will be easier :smiley:


#3

https://ads-api.twitter.com/0/accounts/:account_id/cards/website POST

with parameters in c#:
data.Add(“account_id”, accountId);
data.Add(“name”, cardName);
data.Add(“website_title”, websiteTitle);
data.Add(“websiteUrl”, websiteUrl);
data.Add(“image_media_id”, imageMediaId);


#4

Sorry @ApproSocial,

I need a more detailed information, I don’t know how are you doing that request.

I need you to share the information as you can see here: https://dev.twitter.com/ads/overview/partner-inbounds


#5

Thanks @hector_borras for your prompt response.

I don’t think it’s the authentication problem.
I could create ads campaigns, promoted only tweets, promoted tweets, lineitems, tailored audience, etc to activate a TWEET_ENGAGEMENTS or a FOLLOWERS ads campaign completely using my api calls; but I just have the trouble to create a website card in order to create a WEBSITE_CLICKS ads campaign.

I suspect if it’s because I’m still in Twitter Ads Api Developer phase ? https://dev.twitter.com/ads/overview


#6

I think that’s because you’re making a mistake making the request.

So, I need your “raw” request in order to detect any problem :smiley:


#7

@hector_borras good news - you are right; my fault the wrong spelling; after corrected the parameter to ‘website_url’ the api call worked; now I’ve got another error to sort out -

{“errors”:[{“code”:“INVALID_IMAGE”,“message”:“The image file should have width : height ratio of 5 : 2”,“parameter”:""}],“request”:{“params”:{}}}

I think I know how to resolve this problem, so no worry. Thanks very much for the brain-storming session.

Have a good day.