QuickBook Online API integration oauth issue in Android - android

I am trying to integrate Quickbook API for android but I am not able to find the way to authenticate and access api. They have provided sample for java swing and .net but there is nothing for android. I have tried to use oauth but cant find correct url and parameter for oauth.
Please guide me how I can resolve this issue.

For getting consumer key, consumer secret and apptoken, you can follow the link below.
https://developer.intuit.com/docs/0025_quickbooksapi/0010_getting_started/0010_signup
Using the above tokens and Oauth playground tool, you can get access token and access secret corresponding to you QBO account
https://appcenter.intuit.com/Playground/OAuth
After getting all these tokens, you can use SignPost lib to call QBO REST endpoints from your android client application.
You can follow this SO post - Quickbooks Online filtering with Signpost returns 401 error
(you'll find all endpoint related details in the QBAPI docs.
QB API Docs Link - https://developer.intuit.com/docs/0025_quickbooksapi
Hope it will be useful.
Thanks

Related

How to get token for android OAuth?

I need to send post request to get token from here https://developers.google.com/android-publisher/authorization
But on step 4 I don't have client_secret
I have code / client_id / redirect_uri the JSON does not have it
The most recommended mobile solution is to use AppAuth libraries, which involves these 2 steps:
Use Authorization Code Flow (PKCE)
Login via System Browser (Chrome Custom Tabs)
In this case the request to get a token uses a runtime code_verifier rather than a client_secret. My blog posts and code sample may give you something to compare against, but mobile OAuth can be quite intricate.
Google Mobile OAuth
Google generally recommend AppAuth for mobile logins. The playmarket API is just a scope value, so I see no reason why it wouldn't work.
References to client secrets in the Playmarket page may just be incomplete documentation. I haven't used this particular API but have used similar Google resources.
Quick Next Steps I'd Recommend
Try running the Google AppAuth sample - this blog post of mine makes this very easy.
Then repoint the sample to your Google Auth Server and add the Playmarket scope. You should then get a token and be able to successfully access Playmarket resources.
If there are no problems, integrate the solution into your own app. If you run into usability problems, have a read of my blog posts.
Coding Aspects
Not sure what language you're using, but my Kotlin sample code uses the libraries with a modern async await syntax.

Trying to receive access token from OAuth 2.0 via android

following this tutorial I tried to receive Access Token from my company's site but,
I also had to add headers to the POST method and since the author of the tutorial didnt, I had to do this on my own, but im super new to these things and dont know if i did it the right way. And because of that (possibly?) all i get is a 401 response here are all the files from my project : click me!
If anyone could help me, Id be greatful
I would suggest to use AppAuth-Android, and not implementing the authorization flow by yourself, which can be complicated.
AppAuth for Android is a client SDK for communicating with OAuth 2.0 and OpenID Connect providers.
AppAuth handles the authorization flow (i.e. The performActionWithFreshTokens() method handles the token refreshing automatically).
You can follow Google's AppAuth-Android codelab, which demonstrates how to implement this library.
Hope it helps!

Token validation from backend for Google+ Login on Android Application

I am following this link to validate the token. It is mentioned in the link that for more than 100 requests we should follow below approach.
Using one of the Google API Client Libraries is the recommended way to validate Google ID tokens in a production environment.
The link provides code sample in Java. However I am trying to implement the same in Node.js. But did not find any help on this.
Can anybody help me in this?

Android OAuth 2.O Unable to retrieve Access Token

I am trying to use Google Calendar API from Android client. I have opted OAuth 2.0 for Installed Apps instead of Account Manager for some reasons.
https://developers.google.com/accounts/docs/OAuth2InstalledApp
I have registered my application on Developer API Console and hence I have client_id and redirect uri. The console does not show client_secret.
I have recieved Authorization code from the google server which is 4/XdlW5dvFW3OWCnKdeG8yDOOjYGAw
https://accounts.google.com/o/oauth2/token?
code=4/XdlW5dvFW3OWCnKdeG8yDOOjYGAw&
client_id=54957922365-fjaa2quhukho8sr5bkpkoq8038vdjh9m.apps.googleusercontent.com&
redirect_uri=urn:ietf:wg:oauth:2.0:oob&
grant_type=authorization_code
If I make this HTTPS URL with the mentioned parameters, I recieve 405 Error Method not allowed in my code.
As specified in the URL above, I have added the parameters but am not able to exchange the auth code with access token.
Does anyone has any idea why I am not getting access token while I am able to retrieve authorization code?
Thanks for the code snippet but I was not posting the link on browser, I have written proper android HTTPS code in Android Project. Just for the reference I shared the url.
I have solved this issue. To help other developers, I am attaching the code:
https://github.com/misskhushboo/Code-Snippets.git

Android Google App Engine OAuth difficulties

I have an Android / GAE application. We need to validate the Android user against GAE using OAuth.
We're currently using the Signpost library for this.
We've run through lots of the samples out there and we do seem to get a correct token.
Our problem is once we go to use that token to on our site - we get a 401 - Authorization Failed. The trace from GAE is below:
##TRACE## APIBase:: authenticate() InvalidOAuthParametersError!
The client provided OAuth parameters with the request, but they are invalid.
We've tripple checked our consumer keys, and the other information and we don't know really where to do from here.
Does anyone have any Android to GAE examples that they've used successfully?
Thanks
I learned a lot from the Android2Cloud guys
You can see how they do it at http://code.google.com/p/android2cloud/

Categories

Resources