Skip to main content

A Python wrapper around GroupMe's REST API

Project description

PyGroupMe API

This Python API allows you to interact with GroupMe

Setup

To make use of this tool, it is necessary to first set up an API token on the GroupMe Developer page

Logging into the developer page

Log in to the page using the "Log In" button in the top right corner, and entering your email and password for your GroupMe account.

A note if you use a third-party app to sign in to GroupMe

If you use Facebook, Apple, Microsoft, or another login service to access your GroupMe account, you may need to first set up a password for your account. The only way I know to do this is using GroupMe's "Forgot password" feature. Visit the forgot password page, and enter the email address associated with your account (you can find this by clicking on your profile picture in the bottom right corner of GroupMe in the web browser, and selecting "Profile" from the resulting menu).

Getting your API token

Once you have entered your email and password on the developer page, you may also be prompted to enter a code sent to your SMS or email to verify your identity. Once you are successfully logged in, select "Access Token" in the top right (next to your account name), and you will be presented with a pop-up containing a long string of characters. Copy these, and save them somewhere secure. This is your token which grants you access to the GroupMe API. Tokens allow you to sign in to a web service, fulfilling the role of a combined username and password. As such, they should be treated with the same security level as passwords.

Usage

All the functionality of the API is accessible through the base GroupMe object, which can be imported to a file with the following line of code:

from pygroupmeapi import GroupMe

The GroupMe object will return values of other object types that are defined in this project, so you may wish to import these as well if using Python type hinting. Other classes available are Group, DirectMessage, Chat (a superclass that includes both Group and DirectMessage), and Message. See the individual APIs for each object to see more information on their attributes and methods.

Changelog

  • v2.0.1 - March 20th, 2025
    • Added timeout parameter to get_messages() method on Chat superclass, which previously prevented linters from recognizing it as valid
    • Re-labeled "base object" as "groupme"
  • Published to PyPI - March 19th, 2025
  • v2.0.0 - February 21st, 2025
    • Made timeout for API call throttling configurable
    • Changed Message emoji_mappings field to contain just the charmap as a nested list, instead of a dictionary with the emoji replacement character as a key
    • Added emoji_replacement_char field to Message class, containing the character that is substituted in for powerup emojis
    • Added methods to download and subsequently delete local image files for powerup emojis used in a Message instance
    • Added method to obtain information about messages that are replied to by other messages
  • v1.0.3 - December 20th, 2024
    • Added check for API call throttling
  • v1.0.2 - September 5th, 2024
    • Fixed bug where Chat abstract class did not recognize "before" and "after" parameters in get_messages() function
    • Fixed bug which only allowed group searches to fetch messages 20 at a time (GroupMe hardcoded limit for direct messages), rather than 100 at a time (GroupMe hardcoded limit for groups)
  • v1.0.1 - July 28th, 2024
    • Fixed module import error that prevented the package from being used
  • v1.0.0 - July 27th, 2024
    • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygroupmeapi-2.0.1.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygroupmeapi-2.0.1-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file pygroupmeapi-2.0.1.tar.gz.

File metadata

  • Download URL: pygroupmeapi-2.0.1.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for pygroupmeapi-2.0.1.tar.gz
Algorithm Hash digest
SHA256 ff22fcc3b1fbd11b4784c715910af03a8720c50305a256f6b7dbb48dcbe0b8b1
MD5 00380e63dde87020514ef9f54074e40b
BLAKE2b-256 9e288bc261eb0935f9dd2c0bf97a19abf6b88b84cbe17a9d7a2215d69c62b7d3

See more details on using hashes here.

File details

Details for the file pygroupmeapi-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: pygroupmeapi-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for pygroupmeapi-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb4f28ab3d66fc0f8d29bc45af2f2a13baffadfa70cce150cb93cbbf45e5301e
MD5 780d2cd8e95273363ec9e68a6ddc5f1c
BLAKE2b-256 5910bc8adf7e4fc3afb7d12ab63b0509ff3ac5579dfcb16e391405080cc161c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page