Paypal Get User Info from REST API - paypal

I am building a Login that uses "Login with PayPal button".
and uses the generated button: https://developer.paypal.com/webapps/developer/docs/integration/direct/identity/button-js-builder/
After getting the user's consent, I wants to get the user email address.
the web runs without error, however, I only gets User Id. others are null.
I did the example from the document: https://developer.paypal.com/webapps/developer/docs/api/#get-user-information
what are the right steps to get the user information?
Thank you.

Please look at the code example on https://devtools-paypal.com/guide/openid/ruby?interactive=ON&env=sandbox
As you can see there is a scope defined as
:scope => "openid email"
Most probably you missed email in your code.

Related

How to force logout linked account in actions-on-google?

In the docs, the sign in functionality looks like this:
app.intent('Default Welcome Intent', conv => {
conv.ask(new SignIn('To get your account details'))
})
However, I can't find how to force logout a user who just signed in. Anyone help me please? Thanks.
"Logging out" of an account linked with Google Sign In is tricky, particularly if you're using voice matching as well, since the account sent to the Action is the same account as the one you setup the Assistant device with.
You can go to https://myaccount.google.com/permissions and remove permission from the app/Action/project. Once you do this, the Action will no longer get your user information. (This isn't Action specific - it is a core component of Google Sign In across all platforms.)
The other alternative you have is to reset your Assistant device and set it up with a new account. Then when you go to the Action with this reset device, the account won't be linked.
A explicit sign-out function does not seem to be available. However, this can be a good design decision as the user should be logged in to a particular service "as long as possibly allowed". Therefore, when releasing your apps to production, consider looking at the validity of the access_token and refresh_token on your authorisation server to control the "login period".

OAuth sign in displays unclear message when no account associated

We are having many users signing in (oauth) reporting issues where they email is not valid. Problem is that they do not have an existing account, but message displayed is very confusing.
It should do the following:
Instead of "The email cannot be recognized by Uber", it should have a clearer message that there is no account associated with their email.
Automatically redirect to sign up
Thanks for the improvement tip - we may consider it as a future request. However, this question is not relevant to SO - please use in the future Uber google groups (https://groups.google.com/forum/#!forum/uber-developers) or send post's on Twitter at #UberDevelopers or #Uber_Support.

Sabe REST API of Passenger Name Record NOT OPEN

The below the page did not open, please let me know the REST API of "create passenger name record". I tried to open the page several days, it always failed.
I know SOAP API of "create passenger name record", What I want is REST API.
https://developer.sabre.com/docs/rest_apis/air/book/create_passenger_name_record/
Uh oh. You don’t have access to see this page. Try logging in to see if that does the trick. If that doesn't work and you think you should have access to this page, send us a note. NOTE: if you are a current customer who just registered, it can take us up to 24 hours to set up your account to see the resources. If this is an urgent request please contact us through the site.
Please Sign In or Register.
Error Page as signed in - Image Capture
Which browser are you using?
I tryed it in different browsers (Firefox, Chrome, etc..) and in all of them I get a notice to sign in or register to access this page.
Obviously you're not signed in. Have you tried creating and or signing in?

How to get email of a face book account

I have an android application which need the email address of the face book logged in candidate.
My application works as follows
the user can log in to my application using his face book account. After logged in he can select some items and clicks on OK button. When the user clicks the button ok we need to send an email to his "email address" telling that the details of the items he selected.
I am able to get the first_name and Last_name values but i also need the email address.
can any one tell me how to get the email.
You need to get Facebook extended permissions for that. Specifically you need the email extended permission.
Here's the link to the documentation where you can take a look at all Facebook's permissions you can use in its API.
When you authenticate, just make sure scope contains email like this:
https://www.facebook.com/dialog/oauth?
client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=email,read_stream

Facebook Callback JSON does not return email sometimes

Facebook Graph API.
I am requesting email permission and it works all fine except for some users, the json does not return email field. I am not sure why this happens. The code is same and it works great for all users, returns email field except 1 in 100 or so users where it does not have this field in json. All other fields are there.
Has anyone faced this problem before ??
I checked the facebook privacy settings and there is nothing that prevents email from coming in json if user grants email access to facebook app, yet this is happening to me. I searched the net and no one else seems to be facing this issue.
Any hint would be appreciated
Never makes assumptions about what Facebook will send you, never expect every field to be present and never expect a Graph request to do what you want.
Facebook sometimes do things like this, a missing field here and there, a cryptic and unexpected error somewhere else… While it can be no harm be aware that it also happens in critial places like in the signed_request sent when an user launches an app.
You also have to know that 'your' Facebook may not be everyone else's Facebook. They do geographic and somewhat random deployments of their code. An option to hide your e-mail address to every application could appear for someone but not for someone else, without any particular reason.
Considering your particular issue, I doubt there is an option to hide you e-mail address to an app who has the mail permission, but if the permission is not mandatory someone could accept your app and cherry-pick optional permissions later.
I dealing with this issue recently. Apparently, facebook only promise to return "valid email" address. Some account do not having any "valid email". They can be account who using phone for validation, or account that email is expired. I tried with a account which email, lets said "xxxx.gmail.com" is expired, when query that account graph, i unable to get any email shows(by using facebook debugger). However, when i login xxxx.gmail.com in gmail, and re-activate the email, and i query graph api again for the account, it able to return me email.
had the same issue for a while, which caused some heavy head banging against the wall.
in my case the issue was due to the fact that some users have unverified emails or no email at all (when signing up via mobile/SMS).
in this case facebook will not provide an email on the response.
from the facebook docs:
note: this field will not be returned if no valid email address is
available for the user
sources:
https://github.com/mkdynamic/omniauth-facebook/issues/61
Register with Facebook sometimes doesn't provide email (sebastian's and colm's answers)
https://developers.facebook.com/docs/reference/api/user/
The only thing that worked for me was requesting for permitted fields through the API:
FB.api("/me", {fields: "email,..."}, callback)
This totally fixed the issue.
Hope that helps.