aweber / public-api-examples Goto Github PK
View Code? Open in Web Editor NEWRepository containing examples for api.aweber.com
License: BSD 3-Clause "New" or "Revised" License
Repository containing examples for api.aweber.com
License: BSD 3-Clause "New" or "Revised" License
I keep getting PHP Fatal error: Class 'League\Oauth2\Client\Provider\GenericProvider' not found on line 34
. Right after I enter the secret key, it gets fatal error. Cannot find the GenericProvider, although league/oauth2-client
is installed via Composer.
Hi, while working on the API, I found that there are some missing or incorrect information in the documentation or may be I have miss interpreted.
I'm following this documentation to add subscriber to an account/list
First of all, as you see the ws.op
parameter is required, but the example doesn't show the use of ws.op
parameter.
Secondly, I've tried adding the subscriber using the following code
// add the subscriber if they are not already on the first list
$data = array(
'email' => $email
);
$body = $client->post($SUBS_URL, [
'json' => $data,
'headers' => ['Authorization' => 'Bearer ' . $accessToken]
]);
and got the following error
Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: `POST https://api.aweber.com/1.0/accounts/XXXXXX/lists/XXXXXX/subscribers` resulted in a `400 Bad Request` response: {"error": {"status": 400, "documentation_url": "https://labs.aweber.com/docs/troubleshooting#badrequest", "message": "In (truncated...) ' in /var/www/html/aweber/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /var/www/html/aweber/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 /var/www/html/aweber/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response)) #2 /var/www/html/aweber/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) #3 /var/www/html/aweber/vendor/guzzlehttp/promises/ in /var/www/html/aweber/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113
Also tried appending the '?ws.op=create' in url but nothing works.
Please help, Thank you!
I am not able to get access token in javascript ..I am using a form and when a user enters the details I need to send that to Aweber using javascript..I got an access token using python script but to refresh the access token I need the code in javascript so that I can use it on the client-side..
After generating access token and using the get-tags example from this repository the API call usually works a few times in a row, but fourth time or so the call will simply hang... When it does hang it takes about 2 minutes for it to return.
Hopefully someone can fix this because I would like to use this in order to add subscribers to my lists after they sign up to my web app.
In prompt, everything goes smoothly until I paste the returned URL
"Log in and paste the returned URL here:"
PHP Fatal error: Uncaught League\OAuth2\Client\Provider\Exception\IdentityProviderException: invalid_request in /opt/bitnami/apache/htdocs/vendor/league/oauth2-client/src/Provider/GenericProvider.php:222 Stack trace: #0 /opt/bitnami/apache/htdocs/vendor/league/oauth2-client/src/Provider/AbstractProvider.php(628): League\OAuth2\Client\Provider\GenericProvider->checkResponse() #1 /opt/bitnami/apache/htdocs/vendor/league/oauth2-client/src/Provider/AbstractProvider.php(537): League\OAuth2\Client\Provider\AbstractProvider->getParsedResponse() #2 /opt/bitnami/apache/htdocs/getaccess.php(58): League\OAuth2\Client\Provider\AbstractProvider->getAccessToken() #3 {main} thrown in /opt/bitnami/apache/htdocs/vendor/league/oauth2-client/src/Provider/GenericProvider.php on line 222
I've spent a few hours to no avail. Can't seem to get a token. I always get "Invalid redirect URI"
created an app with http://localhost:3000/callback as callback url (got client_id, client_secret)
read all the docs everywere
changed everything .. same idiotic error (couldn't maybe just say what the * is wrong with my URI?)
and the thing is.. i just wanted to get something that was public anyway. why this convoluted scheme just to get some data? why not a clean, expressive api just like github has?
sorry for the rant but it's a long time since I've bumped into a clueless error like this one.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.