Setting up Auth with Python

Noob question time, but I don’t have a lot of experience with actual API requests. I can’t figure out how to get started, or frankly which Auth system is even current. It’s been suggested that using the Python SDK is the best way, as I need to access some custom fields, and eventually create new contacts, the former I appear unable to do the way I initially started out, which was using Python Requests and REST.

I should clarify this will be a script running locally. It looks like OAuth 2.0 is the proper way to authenticate now? But it also looks like the OAuth process (xml-rpc - Keap Developer Portal) can only be done by redirecting through a web app? What am I missing here?
TIA

@Daniel_Strood,

This is a rather large question and answering any of it really depends on where you’re already at. Are you a programmer and just unfamiliar with using api and authentication? Are you familiar with other auth methods but have worked with api’s before and just need to understand the use of OAuth with the IS api? Or are you not a programmer and you’re asking for a lot more?

I’m afraid if it’s the latter, you will have far, far too much to learn to get from a post on a forum…integrations development involves far more than just putting some code together (ultimately over 40 technologies could be involved depending on what you’re working with).

If it’s either of the first two then specifically state where you’re stuck and we might be able to fill in the blanks regarding that item.

Hi John,
Thanks for the answer and sorry for the dumb vague question. I am mostly a developer, not professional, but I know my way around. I’ve never used OAuth before, but have used other API calls, though never in Python before, usually PHP or JS, neither of which is going to be able to be used for this project.

The place I’m getting stuck is where I mentioned above, but I suspect it’s just because I have no idea how OAuth works. The docs say it’s a pretty standard implementation, so I’ll just figure out how to use that, and if i’m still having issues, I’ll ask again.
Cheers

Ok, so PHP is your best bet (and the most common used with the IS api) and I have a vid that walks through the oauth parts:

Hi Daniel,

If you want to know more about OAuth History, have a read here:

I would not agree on their wording of “Standard Implementation”. Various companies have implemented variations of OAuth in their systems, which has not lead to any consistency in regards to dealing with the Access Tokens. I have seen implementations lasting Forever, or 1 Year, or 2 Weeks, or Infusionsoft case 24 Hours. But some of the other SDKs I have seen seem to automatically handle the refreshing of the Tokens when need be.

John’s video will help you understand things a bit better. Otherwise there is examples on the internet that can explain the basics of OAuth.