Date   

Planning to start a groups.io group - question about API access

Monica
 

RMIT Classification: Trusted


Hi there everyone

 

We are looking to start a group and are checking out all the features. Having an API so we can easily download the content of the group is an excellent feature that we are excited about. However, it is important to us that only the members of the group have access to the content and to this feature.

 

Can someone confirm that the group members can use the API for the group content, rather than say anyone with a groups.io account?

 

Thanks a lot

Monica

 

 

 


Re: most_recent_message is always 0001-01-01T00:00:00Z

Henning Schulzrinne
 

Even that doesn't seem quite right, as the group is quite active, i.e., the last message was definitely not sent nearly 2,020 years ago :-)

We need the per-member most-recent-posting data to determine who the active posters are. We want to force active members to configure a signature in their groups.io profile since we require that all messages on our community board (about 1,200 members) are signed with the name and street name of the poster, to prevent semi-anonymous postings - and people tend to forget to do this on their own. (Requiring a full name tends to discourage less-than-civil exchanges, in our experience.) The plan is to reach out to active posters to update their profile, but there's no point in annoying the vast majority of listen-only members. We're also trying to get a handle on how many active members have completed that task, to see if we need to take more aggressive measures, such as putting everyone without a signature on moderation.

Longer term, we also want to enforce a three-posts-a-day limit, again to discourage back-and-forth exchanges between a few list members that tend to get more heated and discourage everyone else. This would likely work best with a webhook.

Thanks for considering!


On Wed, Sep 2, 2020 at 12:25 AM Mark Fletcher <markf@corp.groups.io> wrote:
On Tue, Sep 1, 2020 at 7:34 PM Henning Schulzrinne <hgs10@...> wrote:
In getmembers, all member records, including active posters, seem to show a most_recent_message value of 0001-01-01T00:00:00Z. This also seems to be the case in 'member'.


That field is actually supposed to be the most recent message sent to the group overall, not by the member. I admit that's not what someone would think it is, and I need to re-think that field, and if it should be in that object.

Also, is there a way to get a message count, i.e., how many messages somebody has sent?


It's not currently possible to get either the most recent date a person sent a message nor how many messages they've sent via the API. Can you give me some more information? What would you like that information for?

Thanks,
Mark


Re: most_recent_message is always 0001-01-01T00:00:00Z

 

On Tue, Sep 1, 2020 at 7:34 PM Henning Schulzrinne <hgs10@...> wrote:
In getmembers, all member records, including active posters, seem to show a most_recent_message value of 0001-01-01T00:00:00Z. This also seems to be the case in 'member'.


That field is actually supposed to be the most recent message sent to the group overall, not by the member. I admit that's not what someone would think it is, and I need to re-think that field, and if it should be in that object.

Also, is there a way to get a message count, i.e., how many messages somebody has sent?


It's not currently possible to get either the most recent date a person sent a message nor how many messages they've sent via the API. Can you give me some more information? What would you like that information for?

Thanks,
Mark


Re: most_recent_message is always 0001-01-01T00:00:00Z

Henning Schulzrinne
 

I'm looking for the API version of getting this data, not the web version, but you're indeed pointing out where this would be visible on the website, so the information must exist.


On Tue, Sep 1, 2020 at 11:25 PM Bob Bellizzi <cdfexec@...> wrote:
You could find one message from the person and,
at the end of that message towards the right side,
click/tap More
click/tap all messages by this person
(just checked this out on this group where I am simply a member)

--
Bob Bellizzi
ex IBM and many others


Re: most_recent_message is always 0001-01-01T00:00:00Z

Bob Bellizzi
 

You could find one message from the person and,
at the end of that message towards the right side,
click/tap More
click/tap all messages by this person
(just checked this out on this group where I am simply a member)

--
Bob Bellizzi
ex IBM and many others


most_recent_message is always 0001-01-01T00:00:00Z

Henning Schulzrinne
 

In getmembers, all member records, including active posters, seem to show a most_recent_message value of 0001-01-01T00:00:00Z. This also seems to be the case in 'member'.

Also, is there a way to get a message count, i.e., how many messages somebody has sent?

Henning


Re: accessing the sent invitations data

Les Schaffer
 

Andy

Thanks for response. I tried setting items per page to 100. It works for members but not for invites

In any case I am for now just using POST to 

  https://groups.io/g/marxmail/invitations

and an html  parser to grab the invitation data. Works well enough. 

Les


Re: accessing the sent invitations data

Andy Wedge
 

On Sat, Aug 1, 2020 at 12:49 PM, Les Schaffer wrote:
get all the results at once instead of 20 at a time
Les,

I don't know about the API but I'm wondering if your '20 at a time' reference is due to your account preferences which may be set to show just 20 items per page? See https://groups.io/account?page=prefs to increase that limit if needed.

Andy


accessing the sent invitations data

Les Schaffer
 

i need to access the sent invitations data for a new group that just sent out approx 1300 invites.  so the api equivalent of 

   https://groups.io/g/marxmail/invitations?o=20&ord=email&d=asc

i see how to send invites, now i need to access the status  of these invites programmatically (or at least know how to get all the results at once instead of 20 at a time). i do not see the required call in the API documentation, wondering if its not hard to add to the API. 

thanks

Les


Re: App updates

Andy Wedge
 

On Thu, Jul 23, 2020 at 08:36 AM, Andy Wedge wrote:
Doing a search in this group for android produces no results.
I realised that this topic about the app was posted on the api group. I'll check the app group too.

Andy


Re: App updates

Andy Wedge
 

On Wed, Jul 22, 2020 at 05:15 AM, Mark Fletcher wrote:
Just a reminder that the app is continuing to be developed
Hi Mark,

I've only seen details about an iOS version in beta testing. Any news on an Android version? Doing a search in this group for android produces no results.

Regards
Andy


App updates

 

Hi All,

Just a reminder that the app is continuing to be developed and I'd appreciate any feedback you may have about it. Push notifications now work, for example, so you can be notified on the go about developments with your group.

Thanks, Mark


Re: /login Changes

Jordan Evans
 

Hi Mark,

On Tue, Jun 16, 2020 at 12:33 PM Mark Fletcher <markf@corp.groups.io> wrote:

Hi Jordan,

On Mon, Jun 15, 2020 at 5:13 PM Jordan Evans <jevans@linuxfoundation.org> wrote:


I noticed that the domain parameter for the login endpoint was removed
(https://groups.io/api#login). I don't recall when that happened, but
it seemed the parameter worked until fairly recently. I have a couple
of related questions:
It was removed on May 26th as part of a fix for a bug preventing the in-development app from logging in on domains other than groups.io



1. Are we expected to auth against the actual domain now? (for
example, https://lists.onap.org/api/v1/login instead of
https://groups.io/api/v1/login?domain=lists.onap.org&...) We
previously used the domain parameter to determine if
an enterprise setup was already deployed for a given domain.
2. Does the token parameter for login currently work? It seems I still
get a cookie and the response appears unchanged.
It should all work as before except you need to log in using the domain in the URL instead of as a parameter. Nothing else changed. The token parameter should work; if it doesn't please let me know the URL you're using to log in and I'll investigate.
Yep, I missed the token response in the bottom of the JSON response.


In terms of trying to determine if a group is set up or not, I would think that the login call wouldn't resolve since the DNS setup wouldn't be complete yet. Could you use that as an indicator?
My reluctance with that is that we don't want to send groups.io
credentials/tokens to a potential third-party. From testing, it
appears if I make the call to https://groups.io/api/v1/login with a
modified Host header, it works as expected, and I don't worry about
sending credentials to other parties.


Re: /login Changes

 

Hi Jordan,

On Mon, Jun 15, 2020 at 5:13 PM Jordan Evans <jevans@...> wrote:

I noticed that the domain parameter for the login endpoint was removed
(https://groups.io/api#login). I don't recall when that happened, but
it seemed the parameter worked until fairly recently. I have a couple
of related questions:

It was removed on May 26th as part of a fix for a bug preventing the in-development app from logging in on domains other than groups.io

 
1. Are we expected to auth against the actual domain now? (for
example, https://lists.onap.org/api/v1/login instead of
https://groups.io/api/v1/login?domain=lists.onap.org&...) We
previously used the domain parameter to determine if
an enterprise setup was already deployed for a given domain.
2. Does the token parameter for login currently work? It seems I still
get a cookie and the response appears unchanged.


It should all work as before except you need to log in using the domain in the URL instead of as a parameter. Nothing else changed. The token parameter should work; if it doesn't please let me know the URL you're using to log in and I'll investigate.

In terms of trying to determine if a group is set up or not, I would think that the login call wouldn't resolve since the DNS setup wouldn't be complete yet. Could you use that as an indicator?

Thanks,
Mark


Re: /login Changes

Eric Searcy
 

Token auth is working for me, but the "domain" POST parameter behavior changed in the last 3-5 days I believe... it used to be that regardless of what vanity domain you used (lists.example.com/api/v1), you still had to pas a domain= POST parameter that changed both the cookie domain and the "d" value of the JWT token (depending which auth was used); now the "d" value is always 1 in the token, regardless of what URL is used. (I haven't re-checked the cookie domain behavior...)

-Eric

On Mon, Jun 15, 2020 at 5:13 PM Jordan Evans <jevans@...> wrote:
Hello,

I noticed that the domain parameter for the login endpoint was removed
(https://groups.io/api#login). I don't recall when that happened, but
it seemed the parameter worked until fairly recently. I have a couple
of related questions:

1. Are we expected to auth against the actual domain now? (for
example, https://lists.onap.org/api/v1/login instead of
https://groups.io/api/v1/login?domain=lists.onap.org&...) We
previously used the domain parameter to determine if
an enterprise setup was already deployed for a given domain.
2. Does the token parameter for login currently work? It seems I still
get a cookie and the response appears unchanged.




/login Changes

Jordan Evans
 

Hello,

I noticed that the domain parameter for the login endpoint was removed
(https://groups.io/api#login). I don't recall when that happened, but
it seemed the parameter worked until fairly recently. I have a couple
of related questions:

1. Are we expected to auth against the actual domain now? (for
example, https://lists.onap.org/api/v1/login instead of
https://groups.io/api/v1/login?domain=lists.onap.org&...) We
previously used the domain parameter to determine if
an enterprise setup was already deployed for a given domain.
2. Does the token parameter for login currently work? It seems I still
get a cookie and the response appears unchanged.


Re: OpenAPI spec

 

Hi Jordan,

On Mon, Apr 27, 2020 at 10:41 AM Jordan Evans <jevans@...> wrote:

Does groups.io publish a OpenAPI/Swagger file for the groups.io API? I
didn't see anything in the API documentation.

We don't have that, sorry. The docs are generated via a custom program that parses the source code and comments.

Mark 


OpenAPI spec

Jordan Evans
 

Hello,

Does groups.io publish a OpenAPI/Swagger file for the groups.io API? I
didn't see anything in the API documentation.

We are looking at creating mock endpoints for testing purposes, and
this is easily done using off-the-shelf tooling with OpenAPI/Swagger
spec files.

Alternatively, has anyone else created mock endpoints for Groups.io,
or have a suggestion for doing it without this tooling?

Thanks,
Jordan Evans


Re: Sample code to integrate with .NET #api #important

Christopher Warrington
 

On 2020-04-08 at 9:02:55 AM, Nadeem Shehzad <nshehzad1@hotmail.com> wrote:

Does anyone have a sample .NET code to call basic API endpoints such as
authentication, creating group etc.
I've just uploaded a simple app that sets a user's location using the API
from C# at https://github.com/chwarr/gio-api-example.

.NET's HttpClient will automatically handle the auth cookies that Groups.io
uses, so it's pretty simple to use the API. Typically you just POST to the
right URI with null for the content.

QueryHelpers.AddQueryString from the Microsoft.AspNetCore.WebUtilities is
helpful to build these URIs.

I've been able to use System.Text.Json to parse the responses that I've
needed so far. I had to write a little snake_case naming policy to convert
between C#'s prevailing UpperCamelCase style and the lower_snake_case used
by Groups.io.

Here's an example that calls login:

var parameters = new Dictionary<string, string>()
{
["email"] = email,
["password"] = password,
// 2FA is shown in the full example, linked above
};

string loginUri = QueryHelpers.AddQueryString(
"https://groups.io/api/v1/login",
parameters);

HttpResponseMessage response = await _httpClient.PostAsync(
loginUri,
content: null);

[1]: https://www.nuget.org/packages/Microsoft.AspNetCore.WebUtilities/

--
Christopher W. <lists@cw.codes>


Sample code to integrate with .NET #api #important

Nadeem Shehzad
 

Does anyone have a sample .NET code to call basic API endpoints such as authentication, creating group etc.

Greatly appreciate if someone can share the code sample

41 - 60 of 253