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

Using Library for https://ads-api.twitter.com/3/accounts #13

Open
CreativeTransmissions opened this issue Mar 2, 2018 · 0 comments
Open

Comments

@CreativeTransmissions
Copy link

CreativeTransmissions commented Mar 2, 2018

Hi there,

I'm evaluating this library for potential use in an upcoming project, however I'm having trouble calling the above request.

Is this possible with this library?

I am calling:
$tmhOAuth->reconfigure(array('host'=>'ads-api.twitter.com'));

I have instanciated the class with consumer_key,consumer_secret, token, secret and bearer.

The response is always:

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

I tried by adapting your cli examples for user_request and apponly_request:

$code = $tmhOAuth->apponly_request(array(
'url' => $tmhOAuth->url('3/accounts')
));

or

$url = '3/accounts';
$request_url = $tmhOAuth->url($url);
$code = $tmhOAuth->user_request(array(
'url' => $request_url
));

  • both give me an authentication error.

Any advice would be greatly appreciated.

Thanks!

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

No branches or pull requests

1 participant