Google API OAuth User info - android

I am working with google OAuth API to get user info using this url
With the scopes
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/userinfo.email
I got the following response
{ "id": "123456788", "name": "Joe Shmoe",
"given_name": "Joe", "family_name": "Shmoe",
"link": "https://plus.google.com/1234567788",
"picture": "https://IMAGE_URL/photo.jpg",
"gender": "male", "birthday": "0000-03-10", "locale": "en-GB"}
I am looking for email but it is not available in response.

It's because google proifle API answer with extended information only to those circles which you allow to see it in you personal info visibility settings.
For instance, if you allow to your friends circle to see your mobile and private email -- they can see it (but only peoples and apps added into those circle).
By default all apps are guests (public).

Related

EMM managed configuration key values for Boxer email app

I am working on setting up email apps for my enterprise in the EMM work profile created through Android management API. I was able to setup the Gmail app using the managed config details in https://support.google.com/work/android/answer/7065453?hl=en.
But I am not able to find such documentations for the Boxer mail or the Outlook app. The gmail app and calendar has been unreliable with some sync issues, so would appreciate some guidance in Boxer mail or Outlook setup through managed configurations.
Not all applications support or document managed configuration. It’s up to the app developer to implement and document it.
You can try checking the managed configuration schema for an app using the enterprise.application.get method. It returns a json with the managed properties that the app supports..
For example:
"managedProperties": [
{
"key": "com.microsoft.outlook.EmailProfile.EmailAddress",
"type": "STRING",
"title": "email address"
},
{
"key": "com.microsoft.outlook.EmailProfile.EmailAccountName",
"type": "STRING",
"title": "description for account"
},
{
"key": "com.microsoft.outlook.EmailProfile.ServerHostName",
"type": "STRING",
"title": "exchange server url"
}]
Additionally, upon checking the Boxer Mail (com.boxer.email), it doesn’t seem to support any managed configuration.

Customer login api using Clover SDK

I have create account in clover and using that account i have found the merchantId and created api token for that using these i have created the customer for that merchant.
I have created the customer in clover and using merchantId and API token.Now i want to login with that created customer but i could not find the api for login in clover.can anyone tell me whether the api available for login with customer in clover?
I have referred this link list of clover apis https://www.clover.com/api_docs#!/customers
I created the customer using this api https://www.clover.com/api_docs#!/customers/CreateCustomer
Api url for create customer : https://api.clover.com/v3/merchants/024SK6Q06NKP0/customers
request parameter :
{
"firstName": "Test",
"lastName": "test Last Name",
"phoneNumber": "2135124541",
"emailAddress": "test#gmail.com",
"zip": "123123",
"country": "In",
"city": "Pune",
"address1": "Vimannagar",
"state": "Maharashtra"
}
It would be great if anyone have idea about this.Thanks in advance.

Paypal SDK sandbox mode return status "Created"

I have integrated Paypal in my android app, user can pay by either Paypal or card.
Card Payment is working correctly but when paying through Paypal returns status "created" instead of "approved".
Below is response from Paypal -
{
"client": {
"environment": "sandbox",
"paypal_sdk_version": "x.xx.x",
"platform": "Android",
"product_name": "PayPal-Android-SDK"
},
"response": {
"create_time": "2016-05-23T10:51:47Z",
"id": "PAY-XXXXXXXXXXXXXXXXXXXXXXXX",
"intent": "sale",
"state": "created"
},
"response_type": "payment"
}
Why it is not returning status to approved.
What is wrong in my code.
TIA
For Sandbox environment, You need to use a credit card that is registered under the sandbox personal account. Check the "Profile" of the PayPal sandbox personal account and go to the "Funding" tab for the test credit card. This will give you a "approved" result instead of "created".
The problem is you are created the Merchant account as Business account in your sandbox, but we need to create Business-Pro account in sandbox.
I got solved the issue by created like that.

Using Google login with phonegap to get user info

I am using PhoneGap to create an app and would like users to sign in to their google accounts and then pull information like their name and email from their profile. Is this at all possible to do? I have found a way for users to login, but I can't figure out a way to get the information. This should be able to work on any device that has the app (mainly android and ios). Any tips would be helpful as I do not know where to begin with this.
After the successful login action get the access token and pass the access token to https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=retrieved_access_token
you will get a json output as
{
"id": "xx",
"name": "xx",
"given_name": "xx",
"family_name": "xx",
"link": "xx",
"picture": "xx",
"gender": "xx",
"locale": "xx"
}

android : loging to gmail using OAuth to retrieve account details

In my app using Google OAuth from Google APIs, i want to get user account details . User will enter his user name and password and login. I saw samples where contact details of the user are retrieved. My requirement is to get user account details like full name, profile photo etc.
I think i can do similar to retrieving contacts , but i am not able to find "SCOPE" to be used for getting account details.
Please help me with right pointers or any sampl app / document on this topic.
thanks a lot
I got my answer
scope - https://www.googleapis.com/auth/userinfo.profile
return youraccess_token = access_token
get https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=youraccess_token
you will get json :
{ "id": "xx", "name": "xx", "given_name": "xx", "family_name": "xx", "link": "xx", "picture": "xx", "gender": "xx", "locale": "xx" }

Categories

Resources