AWeberApi - could not get Subscribers email - api

I run this code
print_r($list->subscribers);
You can see at the result I pasted below that there is no subscriber name and email... I tried all the sample codes i could find in the web and all of them have the same result.
Now my question is, how to get the emails of all the subscribers aside from the code I used above?
[last_followup_sent_link] => https://api.aweber.com/1.0/accounts/6023076/lists/20746327/campaigns/f105556951
[city] =>
[http_etag] => "d6a652460dae642a0732ecf75003de4t05be96f66a1-7c14178a7fa0b2a2b7fb74be93ff058ac477ea43"
[ad_tracking] => my_web_form
[dma_code] =>
[last_followup_message_number_sent] => 1
[last_followup_sent_at] => 2011-11-17 04:52:19-05:00
[latitude] =>
[is_verified] => 1
[status] => subscribed
[area_code] =>
[unsubscribed_at] =>
[self_link] =>
[unsubscribe_method] =>
[resource_type_link] => https://api.aweber.com/1.0/#subscriber
[subscription_method] => signup form
[subscribed_at] => 2011-11-17 04:51:41-05:00
[region] =>
[longitude] =>
[verified_at] => 2011-11-17 04:52:19-05:00
[country] =>

The problem is that you did not grant access to subscriber info in your app. Choose Edit -> Permission Settings, put a check mark in the Request Subscriber Info box then choose save permission settings and then choose save. If done correctly, you should be back at the apps page and it will now be displaying the additional permissions.
You will have to reset the key/secret and then get a new Oauth token and secret as well. When that takes place and it asks for permission, you should see a box above the login credentials detailing the request for personal subscriber details. If you don't see it, something is wrong.
Once completed you should see all subscriber data including email address.

Related

Getting Login Issue for New User with CoSign SOAP API

I have created the new user on the CoSign server. I am getting the following response (User password expired) while logging using the ValidateCredentials method.
Array
(
[Success] =>
[ErrData] => Array
(
[Message] => User password expired.
[Module] => ValidateCredentials
[Code] => -36
[InnerCode] => -1878916637
)
)
Can anybody help?
This error means that the user’s password has expired, and you need to reset it

omnipay payment wall integration -Error

I tried to implement paymentwall payment gateway integration with Laravel using omnipay library.After setting setApiType, setPublicKey and setPrivateKey and trying to call the API, its getting the response "Public key is missed or invalid" from payment wall gateway.
Actually this error is happened due to passing parameter public key as public_Key instead of public_key from the omnipay library.
The following is the response
[request:protected] => Omnipay\PaymentWall\Message\PurchaseRequest Object
(
[endPoint:protected] => https://api.paymentwall.com/api
[parameters:protected] => Symfony\Component\HttpFoundation\ParameterBag Object
(
[parameters:protected] => Array
(
[apiType] => 0
[publicKey] => hjghjghsdfsc5464564564e56456
[privateKey] => gfh4567686786787hfjfhgfgfgh
[amount] => 10.00
[currency] => USD
[accountId] =>
[description] => test Pay
[email] => test#gmail.com
[clientIp] => 112.133.236.158
[browserDomain] => test.com
[card] => Omnipay\Common\CreditCard Object
[response:protected] => Omnipay\PaymentWall\Message\Response Object
*RECURSION*
[zeroAmountAllowed:protected] => 1
[negativeAmountAllowed:protected] =>
)
[data:protected] => Array
(
[type] => Error
[object] => Error
[error] => Public key is missed or invalid
[code] => 2111
[log] =>
)
)
Public key is missed or invalid
As I commented in the issue that you raised on github:
This is working for everyone else. Are you sure there isn't really an issue with your keys? Can you check that there are no spurious newlines, etc, in your key as provided to the library?
The correct name for the public key parameter within Omnipay is publicKey. The correct name within the paymentwall library is public_key. A check of the code appears to indicate that the parameter naming is correct. The Omnipay publicKey parameter is correctly passed to the paymentwall library as public_key.

Is there any concept like google plus app access token

I am currently developing an app for Google+. Is there any way to fetch/search public data with out user authentication, I mean, using an app access token
https://www.googleapis.com/oauth2/v1/activities
Yes, see https://developers.google.com/+/api/oauth#apikey which talks about using an API Key instead of using a user login.
Quoting that page:
For Google+ API calls that do not need to identify a particular user, you can use your application API key. This is useful for server-side applications, or web applications that do not require the user to sign in with Google.
[...]
After you have an API key, your application can append the query parameter key=yourAPIKey to all request URLs. The API key is safe for embedding in URLs; it doesn't need any encoding.
You can get the API key via the new Developers Console by going to http://console.developers.google.com/ and selecting your project, then clicking on the APIs & auth tab on the left and then Credentials. There should be a section on the right Public API Access with a button to press to create a new key if one doesn't already exist.
Still no luck,
Here is the response :
Array
(
[url] => https://www.googleapis.com/oauth2/v1/activities?query=stackoverflow&maxResults=100&orderBy=recent&key=54XXXXXXX4723.apps.googleusercontent.com
[content_type] => text/html; charset=UTF-8
[http_code] => 404
[header_size] => 390
[request_size] => 262
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.813163
[namelookup_time] => 0.411874
[connect_time] => 0.454496
[pretransfer_time] => 0.605186
[size_upload] => 0
[size_download] => 9
[speed_download] => 11
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => 0
[starttransfer_time] => 0.813109
[redirect_time] => 0
[certinfo] => Array
(
)
[primary_ip] => XXX.XXX.XXX.XX
[primary_port] => 443
[local_ip] => 192.XXX.XXX.XXXX
[local_port] => 52227
[redirect_url] =>
)
The answer around the key is correct for general public access. However, the URL you are using is not correct. You want the activities list API I suspect: https://developers.google.com/+/api/latest/activities/list
GET https://www.googleapis.com/plus/v1/people/{userId}/activities/public?key={YOUR_KEY}

Laravel 4, how to send different flash messages depending on users credentials and hidden input

I am trying to check the status of a users account when the user logs into the application with Laravel 4.1.
$attempt = Auth::attempt(array('email' => $input['email'], 'password' => $input['password'], 'active'
=> $input['active']), true);
if($attempt) return Redirect::route('photos.index');
return Redirect::back()->withInput()->with('message', 'Your email or password are incorrect.');
I am using a hidden input "active" to check whether a user account is still active or not. This works fine. However, if this check fails, the user gets to see the same flash message that is displayed when he enters wrong credentials. How could I send a second flash message that states to the user that his account is not active anymore even if he had entered correct credentials?
Any help would be much appreciated.
Thanks!
If the Auth::attempt() fails you can check with this if it succeeded without an active account.
$attempt = Auth::attempt(array('email' => $input['email'], 'password' => $input['password'], 'active'
=> $input['active']), true);
if($attempt) return Redirect::route('photos.index');
// Check if credentials are correct but the account is not active
if (Auth::validate(array('email' => $input['email'], 'password' => $input['password'])))
{
// Valid but not active
return Redirect::back()->withInput()->with('message', 'Account not active.');
}
return Redirect::back()->withInput()->with('message', 'Your email or password are incorrect.');

What's wrong with this Oauth process for LinkedIn + email?

I'm using the oneAuth bundle in laravel, based on NinjAuth from Fuel by Phil Sturgeon, I believe, and trying to get the user's email address.
I've added the proper scope to my request, and the LinkedIn auth screen successfully asks for the users permission for basic profile AND email address.. so far, so good..
A possible issue is: what is the proper name of the email field?
I've found references to email-address, emailAddress, 'emailaddress`...
The docs indicate email-address, but its not working for me :)
I'm using the URL: https://api.linkedin.com/v1/people/~:(id,first-name,last-name,headline,member-url-resources,picture-url,location,public-profile-url,email-address)?format=json
This is the problematic snippet from /bundles/oneauth/libraries/oauth/provider/linkedin.php
// Create a response from the request
return array(
'uid' => array_get($user, 'id'),
// 'email' => array_get($user, 'email-address)',
// 'email' => array_get($user, 'emailAddress)',
'name' => array_get($user, 'firstName').' '.array_get($user, 'lastName'),
'image' => array_get($user, 'pictureUrl'),
'nickname' => $nickname,
'description' => array_get($user, 'headline'),
'location' => array_get($user, 'location.name'),
'urls' => array(
'linkedin' => $linked_url,
),
);
If I uncomment the email field, the request fails somehow (URL still shows mysite.com/connect/callback but the favicon shows linkedin and i get ablank page in chrome: "Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.")
If the email line in the code above IS commented out, I successfully receive all the other details and a new record is added to my users table and the table oneauth_clients, but email is naturally blank..
I must be missing something simple!
Update
The request URL works with email-address, but returns a json object containing emailAddress!!
The script still dies if the return array code above includes emailAddress...
Here is someone's success story:
"I made these two changes to the library and the demo.php respectively:
const _URL_REQUEST = 'https://api.linkedin.com/uas/oauth/requestToken?scope=r_basicprofile+r_emailaddress';
$response = $OBJ_linkedin->profile('~:(id,first-name,last-name,picture-url,email-address)');
The issue was that the Request Token Call is:
https://api.linkedin.com/v1/people/~:(id,first-name,last-name,headline,member-url-resources,picture-url,location,public-profile-url,email-address)?format=json
but the json response is:
array(8) {
["emailAddress"]=>
string(18) "email#email.com"
["firstName"]=>
string(3) "Tim"
...
Note that in the first case email is named email-address, in the second emailAddress.
The secondary problem was a shortcoming of my code - now working perfectly!