I am using sdk version and pretty much got what i want however this is not clear. how can we only connect a docusing account with one click like for example not using any forms or something. just a connect button and get the tokens and account details back using the sdk without any twig or symfony etc. any help would be gretaful.
First of all, sounds like you may need to use JWT, not Auth Code Grant. With Auth Code Grant user needs to log in with user/password, but you want one click.
JWT requires you know/provide the userId of the user being connected. I recommend you try quickstart and pick JWT and see that you can get it working first. Then, design your one button to do the same.
Related
I wanted to create a simple Instagram access token generator that can be used by any user. Something like this:
http://instagram.pixelunion.net/
Now I am able to create a simple access token generator like that using some cURL in php and this
https://www.instagram.com/developer/authentication/
Though the issue is, this access token generator works for the user whose app credentials are used in php and who are included as sandbox user to this client, for all other users it is showing this.
{"code": 403, "error_type": "OAuthForbiddenException", "error_message": "You are not a sandbox user of this client"}
Can anyone say what should I do for a generic access token generator
Screenshot of my app:
Looks like you are not a sandbox user, thats the reason it is failing, use the account used to create developer account to login and that should work.
The example website you have posted is reviewed and live, so any user can login. You are in sandbox mode.
ok, I am able to achieve what I desired.
The reason for it was the app needed to be submitted for review. Though at first it got rejected, as it requires a video url showing what this app really want to achieve and how it is doing that. So, I created a video corresponding to all work and submitted again, it got approved and finally the code work as expected.
Here is an output of that:
http://webkul.com/instatoken/
If anyone feels to ask anything about it, they can ask it here.
I have used following use case for permission review:
I have a problem to find the right way of implementing a login service.
First my environment:
An Android or IOS APP
My own web-api in PHP
Now the users have to login to get specific data from the api. So I have to check if the user is logged in with the API.
First i thought I could do this with JWT (JSON Web Token). But users with existing Google or Facebook account should also login to my side.
Is there a way to implement the login in PHP (the API site)? The most examples to login with Google or Facebook are simple Websites and not an APP with API.
How could I implement this login system?
Some time ago I thougt I could use GIT (Google Identity Toolkit). But now they switch to firebase and the website only contains examples for Webapps and Android/IOS.
Is there a common technique to do a login system like mine?
Do I have to implement OAuth2?
Oh. Besides the Google/Facebook login, there sould be a way to login with email and password.
I'm a little bit confused. It can not be, that I'm the only one with this problem. Or do I am a blockhead?
Yes, it is posible and it is well documented on the API's page.
For Facebook login, you can check this link.
For the Google's case, you should check this link
Side note: I know that I should quote the relevant parts of the link, but there are too much steps to follow, specially on the Google's case, so I haven't done it to avoid a huge block of quotes.
Solution:
Implement the Login in the Android- or IOS-App and get there the access token. Now send this token to the API. There you can check it and to everything you want with the Facebook-/Google-API.
This is a tough question to ask so I hope I can make it clear!
I'm writing a PHP script that access a users Gmail calendar. I first wrote it using Zend and it was fantastic, but found that I have to use the Oauth to get to tasks - therefore I rewrote it for Oauth instead.
In order to use Oauth I have to go to my API console and set up the account and then I have access and everything works great. Here is my problem: I can't ask every single user to go through this somewhat technical step of creating a key and all of that just so my app can work with their Gmail.
Zend was really easy, the user provides me with their name and password and I have access. Now I don't see any way to change accounts using the Oauth method, all of the credentials are for a SINGLE Gmail account (as far as I can tell).
Is there a way to do what I'm trying to do without making the users go through fifteen hoops to allow me access? I would like to register my app and get my keys, then be able to point to ANY Gmail account, the user grant me access, and I'm in. Otherwise each user has to go to the API console in their own Gmail, create branding, create a key and then create a server ID, THEN provide that all to me so I can plug it in and THEN redirect them back to Google so they can say "yes, I accept this". That's a lot of steps to integrate.
I hope this was clear enough :).
That's basically how OAuth works. ONLY the developer that wrote the app needs to register it, get the keys and add that to the configuration.
Users of the app simply get taken to a page (after signing into their Google account) where they will grant access to your app in a single click. Google will remember their decision and the next time will be even faster.
I am looking to see how we can allow a user to connect with their Google Analytic's User ID and connect with our app and we can get the information from their account.
I am looking forward to some articles or any library thats build around the same.
I will be using PHP and MySQL. Do you suggest any other Database than MySQL ?
You can start with a database to keep things simple and since you are not looking to store too much of historical data. The link below should get you started with all the required libraries and documentation.
https://developers.google.com/analytics/devguides/reporting/core/v2/gdataAuthentication
Go for the web client based authentication model rather than the service account model.
This will cause the api to redirect your user to google authorization page and your app will be given privileges to user account.
Make sure you save the refresh token when it redirects back to you app.
Please note that the refresh token only get sent for the very first time you app asks for permission and not after that.
I simply need to know if someone is following me on twitter, when they load my website.
I have a follow button posted on my website for users to follow me easily (I made the button via: http://twitter.com/about/resources/buttons#follow)
I guess the issue is this--if they aren't logged into twitter, and they click the button to follow, it will prompt for a username/password. Is there a way to verify if they are already logged in? I assume there's some sort of oauth cookie value? However, since I'm using twitter's follow button, is this saved somewhere?
Then, after I verify that they are logged in, I see that there is "friendships/exists" but this would require to know what the person's user_id or screen_name, which goes back to the question above concerning authentication.
My guess is that I will have to have a "verify" button next to twitter's follow button, which would force the user to log in again and create a local session variable so I can process that and verify if they are following me. Am I taking the right approach in doing so? Or is that too complicated?
You have made a step in the right direction. You would use Twitter's #anywhere API for this. If the user authenticates your website, the API will drop a cookie on your site determining the connected state of the user.
You may want to also check out this post: https://dev.twitter.com/discussions/3238
The relevant API call would be,
your followers
https://api.twitter.com/1/followers/ids.json?screen_name=twitterapi
https://dev.twitter.com/docs/api/1/get/followers/ids
your following
https://api.twitter.com/1/friends/ids.json?screen_name=twitterapi
https://dev.twitter.com/docs/api/1/get/friends/ids