Date   

Re: Question on Remove Member API call #api #removemember

 

Thanks Mark! Maybe I’m not following this. Since the action is to remove a member, I used the unique user ID for that member — in our group these are mostly 7-digit numbers starting with a 6. Basically, I started with the person’s email, and then did an API call to get their user_id, then did the remove call using that value. Please forgive my ignorance, but what is the difference between the two IDs you are talking about? Sorry — away from desk or would include more specific info. 

Kevin 

On Feb 4, 2022, at 2:10 PM, Mark Fletcher <markf@corp.groups.io> wrote:



(resending this because my original response for some reason was only sent to the sender and not the group)

Hi,

It looks like you're using the user_id value of the member info object, when you should be using the value of the id field. That means you're trying to remove a completely different person.

Hope this helps.
Mark


Re: Question on Remove Member API call #api #removemember

 

(resending this because my original response for some reason was only sent to the sender and not the group)

Hi,

It looks like you're using the user_id value of the member info object, when you should be using the value of the id field. That means you're trying to remove a completely different person.

Hope this helps.
Mark


Question on Remove Member API call #api #removemember

 

Can't make the Remove Member API call work. It keeps saying I don't have permission to remove a member, though in fact I do. Here are specifics:

Curl call being used to remove the member:
curl "https://groups.io/api/v1/removemember" -b "cookies.curl" -d "group_id=XXourgroupID" -d "member_info_id=XXpersonsID" -d "csrf=1234our19-digitnumber56789" -v

Note that I have tried both my log-in as a moderator and also the owner account for the group for the login. Both run into the same problem.

Here are the permissions from the "perms" section of the log-in output for the owner account, which shows that "remove_members" is true:

{"object":"perms","archives_visible":true,"polls_visible":true,"members_visible":true,"chat_visible":true,"calendar_visible":true,"files_visible":true,"database_visible":true,"photos_visible":true,"wiki_visible":true,"member_directory_visible":true,"hashtags_visible":true,"guidelines_visible":false,"subgroups_visible":false,"open_donations_visible":false,"sponsor_visible":false,"manage_subgroups":true,"delete_group":true,"download_archives":true,"download_entire_group":true,"download_members":true,"view_activity":true,"create_hashtags":true,"manage_hashtags":true,"manage_integrations":true,"manage_group_settings":true,"make_moderator":true,"manage_member_subscription_options":true,"manage_pending_members":true,"remove_members":true,"ban_members":true,"manage_group_billing":true,"manage_group_payments":true,"edit_archives":true,"manage_pending_messages":true,"invite_members":true,"can_post":true,"can_vote":true,"manage_polls":true,"manage_photos":true,"manage_members":true,"manage_calendar":true,"manage_chats":true,"view_member_directory":true,"manage_files":true,"manage_wiki":true,"manage_subscription":true,"public_page":true,"sub_page":true,"mod_page":true}

Yet when the curl command executes, the api returns a 400 error and this explanation:
{"object":"error","type":"inadequate_permissions","extra":""}

I'm baffled. Can't find anything in the API help pages that explains this. And in fact, the example "error" message in the API help page for that command is a similar permissions error.

Anybody else had this problem? Any clues how to fix? Thanks all -- the API is really terrific.

Kevin, SF Beekeepers





API Developer to connect groups.io to a CRM ?

RHSC Communications <communications@...>
 

Hello Groups.io community,

We are considering switching our current listservs to groups.io and I was wondering if there are any developers for hire that would be interested in creating a sync tool that would connect our CRM to groups.io (both have an API).

We are interested in the following functionality: whenever a contact is updated/created/deleted in our CRM (with a certain tag), the same contact will be added/updated/deleted from the specific sub-group they are part of. Basically we want to sync contacts from CRM to Groups.io.

Do let me know if you have anyone that you could recommend it taking such a job!

Many thanks!


A Lesson I Just Learned...

Jeff Scheel <jeff@...>
 
Edited

To help all the future API users and writers, I just learned that what the documentation calls a "boolean" (on POSTs) is not a JSON Boolean to Python, but rather a string of value either "false" or "true".  It took a fair amount of playing with curl and postman (and then Python) to figure this out.

Hopefully, this tip will help someone else.
-Jeff


WordPress integration - for membership plugin

Wade Peterson <email@...>
 

Wondering if anyone is working on a WordPress / Groups.IO integration, or possible plug-in that would synchronize between Groups.IO and a membership plug-in such as:

 

I’m part of a sportscar club that has both a website and a Groups.IO group.  This way, we could allow members to go to our normal website, for registration (which would synchronize with Groups.IO, sending invites, etc.); display the Groups.IO member directory; maintain their own user information (which would include additional custom fields such as car make and model, etc.)

 


API endpoint to add hashtags to existing topics?

Derek Milliner
 

I may be missing it, but is there an API endpoint or a methodology to update existing topics with hashtags? A group member has bravely (foolishly?) volunteered to work on classifying topics transferred from a Yahoo! group, but the prospect of having to manually update some 16,000 topics is daunting to say the least. I'd hoped to be able to develop some tooling to automate at least some of the process.

Regards,

Derek   


Re: What values are valid for sort_field in Search Archives? #api

groups@...
 

On Tue, Sep 7, 2021 at 01:04 PM, Mark Fletcher wrote:
On Tue, Sep 7, 2021 at 8:57 AM <groups@...> wrote:

I already searched the group and found one question similar to mine, but it was unfortunately unanswered. :-(

I am specifically trying to set "sort_field" in the "Search Archives" API call. Without setting it, the returned topics list is I suppose, in an order of "relevance". I want the order to be chronological.

This should be fixed now. You can use `relevance` or `created`.
Sweet -- I just tried it and it works! (And I see you've updated the docs as well. Thank you!)

-Dave


Re: What values are valid for sort_field in Search Archives? #api

 

On Tue, Sep 7, 2021 at 8:57 AM <groups@...> wrote:

I already searched the group and found one question similar to mine, but it was unfortunately unanswered. :-(

I am specifically trying to set "sort_field" in the "Search Archives" API call. Without setting it, the returned topics list is I suppose, in an order of "relevance". I want the order to be chronological.

This should be fixed now. You can use `relevance` or `created`.

Cheers,
Mark 


Re: Where's the token from login endpoint? #api

groups@...
 

Ok, got it. The token is not a variable to pass, but rather the username. Thanks.

It would be helpful to future folks to probably provide this information in the API documentation. :-)

Thanks again.


What values are valid for sort_field in Search Archives? #api

groups@...
 

Hi All,

I already searched the group and found one question similar to mine, but it was unfortunately unanswered. :-(

I am specifically trying to set "sort_field" in the "Search Archives" API call. Without setting it, the returned topics list is I suppose, in an order of "relevance". I want the order to be chronological.

I have reviewed the API documentation thoroughly, and "sort_field" is not defined consistently,

The usual definition for "sort_field" is: "The field to sort on. Valid values are dependent on the call." This is true for "Search Archives".

I have tried the following parameters for "sort_field" in the "Search Archives" API call, but unfortunately, none seemed to work: "id, created, subject, title, name, order". In all instances, the return messages were "sort_field": "relevance".

Is "sort_field" parameter simply un-implemented in the "Search Archives" API? Is there any chance it will be implemented, or will I simply have to perform my own sort on the returned objects?

Thanks,

-Dave

 


Re: Where's the token from login endpoint? #api

 

On Tue, Sep 7, 2021 at 8:10 AM <groups@...> wrote:

For example, this below results in an "unauthorized" error:

dave@Moonquake:~ $ curl "https://groups.io/api/v1/gettopics?group_name=<group_name>" -d token="<redacted>"
{"object":"error","type":"unauthorized_error","extra":""}

 

To use a token with curl, include the token using the '-u' parameter to curl, so something like:

Also note the colon at the end.

Cheers,
Mark


Re: Where's the token from login endpoint? #api

groups@...
 

On Tue, Sep 7, 2021 at 04:37 AM, Derek Milliner wrote:
Meant to add to that that the example in the API docs (https://groups.io/api#login) is a bit misleading on that - it shows a cookie-based request with a token-based response :-)

Derek,

Thank you so much. That explains my confusion -- if the documentation is mixed up, that provides a shaky foundation to build on.

So I followed your example adding the "token=yes" POST parameters and was able to get a token back. The next thing I would like to do is to get a group's topics using token-based auth. The example in the documentation is:

curl "https://groups.io/api/v1/gettopics?groupid=2" \
-b "cookies.curl"


The documentation example above looks like a cookies-based auth request. How do I convert that into a token-based request?

For example, this below results in an "unauthorized" error:

dave@Moonquake:~ $ curl "https://groups.io/api/v1/gettopics?group_name=<group_name>" -d token="<redacted>"
{"object":"error","type":"unauthorized_error","extra":""}

 

*pulls out hair*

Likewise I tried this:

dave@Moonquake:~ $ curl "https://groups.io/api/v1/gettopics?group_name=<group_name>" -a 123456: -d token="<redacted>"
{"object":"error","type":"unauthorized_error","extra":""}


What is weird is I can get the cookie-based auth working in Postman (but not token-based auth) -- not sure where the differences is between Postman and curl, honestly.

I appreciate all your assistance with me figuring out how to use the API.

-Dave


Re: Where's the token from login endpoint? #api

Derek Milliner
 

Meant to add to that that the example in the API docs (https://groups.io/api#login) is a bit misleading on that - it shows a cookie-based request with a token-based response :-)


Re: Where's the token from login endpoint? #api

Derek Milliner
 

By default the login uses cookie-based so the 'token' as such is in the cookie. If you add 'token=true' to the request (so "email=&password=&token=true") you'll get the token stanza in the return:

    },

    "token""ey...EZhY"
}

If you don't already, I'd recommend using the (free) Postman REST client for experimenting with the API;
https://www.postman.com/product/rest-client/


Where's the token from login endpoint? #api

groups@...
 
Edited

In the log which follows, I have redacted sensitive information.
 
When I run curl (for a crude test) from an Ubuntu Linux 20.04 system using the /login endpoint, providing valid email and password, I get back the following JSON (re-formatted by jsonlint.com website). There is no error indicated that I can see. So...where's the "token": "", section that's supposed to be near the end of the JSON response?
 
Without the token, I can't really perform any other API operations, no? I have reread https://groups.io/api#login and cannot seem to locate the error.
 
dave@Moonquake:~$ curl "https://groups.io/api/v1/login" -c /tmp/cookies.curl -d "email=&password="
 
{
"user": {
"id": "",
"object": "user",
"created": "2021-09-06T15:18:09.179936685-07:00",
"updated": "2021-09-06T15:21:10.557412629-07:00",
"email": "",
"full_name": "",
"user_name": "",
"timezone": "America/New_York",
"status": "user_status_confirmed",
"profile_photo_url": "",
"post_pref": "user_postpref_html",
"per_page_pref": "user_per_page_pref20",
"allow_facebook_login": false,
"allow_google_login": false,
"allow_sso_login": false,
"csrf_token": "",
"two_factor_enabled": false,
"recovery_codes": "",
"dont_munge_message_id": false,
"about_me": "",
"about_format": "about_html",
"location": "",
"website": "",
"time_pref": "standard_time",
"date_pref": "us_date",
"monday_start": false,
"profile_privacy": "profile_private",
"default_message_view": "thread_view",
"topics_sort_dir": "sort_none",
"topic_sort_dir": "sort_asc",
"messages_sort_dir": "sort_none",
"expanded_messages_sort_dir": "sort_none",
"search_sort": "date_sort",
"search_sort_dir": "sort_none",
"photos_order_by": "",
"photos_sort_dir": "sort_none",
"album_order_by": "",
"album_sort_dir": "sort_none",
"default_calendar_view": "cal_view_month",
"default_hashtag_view": "view_grid",
"default_rsvp_view": "view_grid",
"home_page": "home_page_feed"
}
}

dave@Moonquake:~$ cat /tmp/cookies.curl
# Netscape HTTP Cookie File
# https://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
 
#HttpOnly_.groups.io    TRUE    /       TRUE    1633560642      groupsio        <REDACTED_DATA>
 


Installing on a different drive other than C:

tisenhour@...
 

I would like to install the program on drive D: It defaults to Drive C:.   My  reason for wanting to install to drive D: is that my drive C: is an SSD and is very small... only 115 GB.  Windows 10 has (over time) eaten up all of the free space and now I can't even up date windowz for a lack of free space.  My Drive D: is an HHD, and has a terabyte of storage.  I have been able to move most of my programs over to it but for some reason when I try to install N3FJP it doesn't give me an option to which drive I want to install it on.  I have searched all of the FAQs and can't find anything.   This may sound stupid but I just thought I would ask.  Back before the Plandemic, when work was good and steady, I would just buy a new computer or a larger SSD but money is tight and I was hoping for a less costly solution.  Thanks


Re: Uploading Pictures via API getting inadequate_permissions #api

 

On Mon, Aug 30, 2021 at 3:11 PM Eric di Domenico <eric@...> wrote:
Mark, did the ability to add a description to the picture ever get resolved?


I just added the `description` parameter to the `/addphotos` endpoint.

If you're still receiving a bogus response from calls to that endpoint, please send the entire response and I'll investigate.

Thanks,
Mark 


Re: Uploading Pictures via API getting inadequate_permissions #api

Eric di Domenico
 

Mark, did the ability to add a description to the picture ever get resolved?

Thanks,

Eric


Re: Feed of original messages

Konstantin Ryabitsev
 

On Thu., Aug. 19, 2021, 20:22 Mark Fletcher, <markf@corp.groups.io> wrote:
 I am looking for a way to
retrieve messages directly via API or similar means. I know that these
raw messages are preserved somewhere on the backend, as I can get them
via an "archive export" zip files.

Can you give me some more information? How would you like to retrieve the original emails?

I'll be happy with anything, including an Atom feed with links to rest endpoints where I can retrieve original rfc2822 messages as received by groups.io (with all original headers and bodies).

All the Atom feed needs to contain are the message-ids with perhaps minimal summaries plus the retrieval link. 

Best regards,
Konstantin

21 - 40 of 279