Skip to main content
OneLogin
  • BLOG
  • DOCS
  • API REFERENCE
  • SUPPORT
Free Trial (opens in new tab)
Free Trial (opens in new tab)

▶ Getting Started

  • Developer Overview
  • Authorizing Resource API Calls
  • Working with API Credentials
  • Using Query Parameters
  • Postman Collections
  • Client SDKs

▶ OAuth 2.0 Tokens

  • POST Generate Tokens
  • POST Refresh Tokens
  • POST Refresh Token
  • POST Revoke Token
  • GET Get Rate Limit

▶ Apps

  • GET Get Apps

▶ Users

  • User Resource
  • Delegate Authentication
  • POST Create User
  • GET Get Users
  • GET Get User by ID
  • GET Get Apps for a User
  • GET Get Roles for a User
  • GET Get Custom Attributes
  • PUT Update User by ID
  • PUT Assign Role to User
  • PUT Remove Role from User
  • PUT Set Password by ID Using Cleartext
  • PUT Set Password by ID Using Salt and SHA-256
  • PUT Set Custom Attribute
  • PUT Set User State
  • PUT Log User Out
  • PUT Lock User Account
  • DELETE Delete User by ID

▶ Login Page

  • Logging a User In Via API
  • POST Create Session Login Token
  • POST Verify Factor
  • POST Create Session

▶ SAML Assertions

  • POST Generate SAML Assertion
  • POST Verify Factor

▶ Multi-Factor Authentication

  • Overview
  • POST Enroll a Factor
  • POST Activate a Factor
  • POST Verify a Factor
  • POST Generate MFA Token
  • GET Get Available Factors
  • GET Get Enrolled Factors
  • DELETE Remove a Factor

▶ Roles

  • GET Get Roles
  • GET Get Role by ID

▶ Events

  • Event Resource and Types
  • Event Type Lookup
  • Event Webhooks
  • GET Get Event Types
  • GET Get Events
  • GET Get Event by ID

▶ Groups

  • GET Get Groups
  • GET Get Group by ID

▶ Privileges

  • POST Create a Privilege
  • GET List Privileges
  • GET Get a Privilege
  • PUT Update a Privilege
  • DELETE Delete a Privilege
  • POST Assign Roles
  • GET Get Assigned Roles
  • DELETE Remove Role
  • POST Assign Users
  • GET Get Assigned Users
  • DELETE Remove User

▶ Invite Links

  • POST Generate Invite Link
  • POST Send Invite Link

▶ Embed Apps

  • GET Get Apps to Embed for a User

▼ Samples

  • AWS CLI Assume Role
API Docs > 1 > Home > API Version 1 > Samples > Python

Python

Python code samples for the OneLogin API.

Have a Question?

Found a problem or a bug? Submit a support ticket.

Looking for walkthroughs or how-to guides? Check out our Knowledge Base.

Have a product idea or request? Share it in our Ideas Portal.

In This Section

  • Work with OAuth 2.0 Tokens, Users, and Roles
  • Create a User
  • Get Events
OneLogin
 
  • TERMS
  • ///
  • PRIVACY
  • ///
  • SECURITY (opens in new tab)
  • ///
  • COMPANY (opens in new tab)
  • ///
  • CAREERS (opens in new tab)
  • ///
  • SAMLTOOL.COM (opens in new tab)
© 2015 - 2026 OneLogin, Inc. All Rights Reserved