trash nothing
  1. users
trash nothing
  • messages
    • List conversations
      GET
    • Mark all conversations as read
      PUT
    • Search conversations
      GET
    • Delete conversation
      DELETE
    • Archive conversation
      PUT
    • Block conversation
      PUT
    • Mark conversation as read
      PUT
    • List conversation messages
      GET
    • Reply to conversation
      POST
    • Report conversation
      POST
    • Unarchive conversation
      PUT
    • Unblock conversation
      PUT
  • misc
    • Send feedback
  • groups
    • Search groups
    • Retrieve multiple groups
    • Join groups
    • Retrieve a group
    • Submit group answers
    • Contact group moderators
    • Leave a group
  • photos
    • Create a photo
    • Retrieve multiple photos
    • Delete a photo
    • Rotate a photo
  • posts
    • List posts
    • Submit a post
    • List all posts
    • List all post changes
    • Retrieve client.js
    • Retrieve multiple posts
    • Search posts
    • Retrieve a post
    • Update a post
    • Delete a post bookmark
    • Bookmark a post
    • Retrieve post display data
    • Flag a post
    • Map a post
    • Promise an offer post
    • Reply to a post
    • Satisfy a post
    • Share a post
    • Unpromise an offer post
    • Withdraw a post
  • stories
    • List stories
    • Submit a story
    • Retrieve a story
    • Like a story
    • Unlike a story
    • Record story viewed
  • users
    • Retrieve current user
      GET
    • Update current user
      PUT
    • List current users' email alerts
      GET
    • Create an email alert
      PUT
    • Delete an email alert
      DELETE
    • Change email address
      POST
    • Set users' email address as not bouncing
      PUT
    • List current users' groups
      GET
    • Update location
      PUT
    • List current users' group notices
      GET
    • List current users' post locations
      GET
    • Save a post location for the current user
      PUT
    • List current users' posts
      GET
    • Search current users' posts
      GET
    • Set a profile image
      POST
    • List current users' profile images
      GET
    • Resend account verification email
      POST
    • Send password reset email
      POST
    • Report a user
      POST
    • Retrieve a user
      GET
    • Retrieve user display info
      GET
    • Submit feedback on a user
      POST
    • List posts by a user
      GET
    • Search posts by a user
      GET
    • Retrieve a users' profile image
      GET
  1. users

List current users' groups

GET
/users/me/groups
users
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://trashnothing.com/api/v1.2/users/me/groups'
Response Response Example
200 - Example 1
[
    {
        "country": {
            "abbreviation": "CA",
            "name": "Canada"
        },
        "group_id": 46,
        "has_questions": true,
        "homepage": "https://trashnothing.com/OttawaReuse",
        "identifier": "OttawaReuse",
        "latitude": 45.423494,
        "longitude": -75.697933,
        "member_count": 4838,
        "membership": {
            "date": "2015-01-22T17:05:50",
            "questionnaire": {
                "message": "This group is only for people who live in Ottawa.",
                "questions": [
                    "Where do you live?"
                ]
            },
            "status": "pending-questions"
        },
        "name": "Ottawa Reuse",
        "open_archives": false,
        "open_membership": false,
        "region": {
            "abbreviation": "ON",
            "name": "Ontario"
        },
        "timezone": "America/Toronto",
        "utc_offset": -5
    }
]

Request

Query Params
membership
string 
optional
Set the membership parameter to only return certain groups. The options are:

- subscribed: Only return groups the user is a member of.
- pending-questions: Only return groups where the user needs to respond to a new member questionnaire.
- pending: Only return groups where the user is waiting for their membership request to be approved (excludes groups which are pending-questions).

If unset, all groups the user is a member of and pending membership on will be returned.

Responses

🟢200The users groups.
application/json
Body
array of:
country
object 
optional
Provides information about the country that is associated with a group. May be null.
Example:
{"abbreviation":"US","name":"United States"}
abbreviation
string 
optional
A 2 letter country code for the country (see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ).
name
string 
optional
The name of the country.
group_id
string 
optional
has_questions
boolean 
optional
When true, anyone requesting membership to this group will be required to answer a new membership questionnaire.
homepage
string 
optional
A URL to the group homepage.
identifier
string 
optional
A unique identifier for the group that is used in URLs.
latitude
number 
optional
longitude
number 
optional
member_count
integer 
optional
The number of members who belong to the group.
membership
object 
optional
Provides information about the current users' active or pending membership to this group (if any). Will be null if there is no active or pending membership to this group.
date
string <date-time>
optional
For pending and pending-questions memberships, this is the UTC date and time when the current user requested membership to this group. For subscribed memberships, this is the UTC date and time when the membership status became subscribed.
questionnaire
object 
optional
Membership questionnaire data. Will be null unless the membership status is pending-questions.
status
string 
optional
One of: subscribed, pending, pending-questions
name
string 
optional
The name of the group (not guaranteed to be unique).
open_archives
boolean 
optional
When true, the group posts are viewable by anyone. When false, the group posts can only be viewed by members of the group.
open_membership
boolean 
optional
When true, the group allows anyone to join. When false, the group moderators review and approve applicants.
region
object 
optional
Provides information about an area within a country that a group is associated with (eg. a state in the US or a province in Canada). May be null.
Example:
{"abbreviation":"CA","name":"California"}
abbreviation
string 
optional
A 2 letter abbreviation for the region (is not guaranteed to be globally unique but is unique among all the regions in the country).
name
string 
optional
The name of the region.
timezone
string 
optional
The timezone that the group is in (eg. America/New_York).
utc_offset
number 
optional
The group offset (in hours) from UTC time. This does not take into account daylight savings time (DST) in places that observe DST so it may be incorrect during DST.
🟠400Invalid membership parameter.
Modified at 2022-09-11 18:59:48
Previous
Set users' email address as not bouncing
Next
Update location
Built with