Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TwitterAds::NotAuthorized when PUT accounts/:account_id/cards/website/:card_id #227

Closed
koki-miyazaki opened this issue Jun 10, 2020 · 3 comments
Assignees
Labels

Comments

@koki-miyazaki
Copy link

Issue Type: Bug

Description:
twitter-ruby-ads-sdk v7.0.0

there seems to be some bug in the SDK that we cannot add asterisk in parameter
I tested in UI and postman and they allowed me to use asterisk in card name

TwitterAds::NotAuthorized (#<TwitterAds::NotAuthorized:0x47446210089440 code=401 details="[{:code=>"UNAUTHORIZED_ACCESS", :message=>"This request is not properly authenticated"}]">)

Expected Result:

ads_account = TwitterAds::Client.new(
  consumer_token,
  consumer_secret,
  ads_access_token,
  ads_access_secret,
).accounts(ads_account_id)

card = TwitterAds::Creative::WebsiteCard.load(ads_account, card_id)
card.name = 'test'
card.save # it does not raise error
card.name = 'test*'
card.save # it should not raise error

Actual Result:

ads_account = TwitterAds::Client.new(
  consumer_token,
  consumer_secret,
  ads_access_token,
  ads_access_secret,
).accounts(ads_account_id)

card = TwitterAds::Creative::WebsiteCard.load(ads_account, card_id)
card.name = 'test'
card.save # it does not raise error
card.name = 'test*'
card.save # it raise error
osowskit added a commit to osowskit/twitter-ruby-ads-sdk that referenced this issue Aug 31, 2020
@osowskit
Copy link
Contributor

Great catch. I've submitted a PR #229 that should resolve this.

@osowskit osowskit self-assigned this Sep 1, 2020
@osowskit osowskit added the bug label Sep 1, 2020
osowskit added a commit that referenced this issue Sep 24, 2020
* Add MAP parameters for line items

* Update license to 2020

* Bump version

* fixes #227 by using CGI for url param encoding
@osowskit
Copy link
Contributor

This should be fixed in the latest release. Thank you for reporting this.

@koki-miyazaki
Copy link
Author

thanks @osowskit ! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants