Date   

Re: Uploading Pictures via API getting inadequate_permissions #api

Eric di Domenico
 

Awesome! it works!

Thank you!


Re: Uploading Pictures via API getting inadequate_permissions #api

 

On Wed, Nov 27, 2019 at 6:58 AM Eric di Domenico <eric@...> wrote:
Any chance someone from Groups.io can reply to this?
_._,_._,_
I just fixed a bug with that call. Please try again.

Thanks,
Mark


Re: Uploading Pictures via API getting inadequate_permissions #api

Eric di Domenico
 

Any chance someone from Groups.io can reply to this?


Re: Help! I'm confused on how to migrate via the api

sierragamers@...
 

Mark:

I pre-paid a year of premium service and sent you (via private email) a test MBOX file. I'm not sure I have the format correct. Specifically, I didn't know how to tie replies to the original posting. 

Can you take a look and let me know if what I sent will work for you?

Thank you,
Ken Williams


Message to +subscribe, re: display name

ajomccauley@...
 

Forking off topic #156

I'm thinking of using a basic webform on our website (it's Drupal so there's a webform module) that just sends a message to the "+subscribe" email address of our group.

The automatic email from the webform submission is like, kinda sorta from the submitting user's email address, and in my testing, it seems to work great -- but the Display Name isn't getting populated, and I can't figure out why.

Specifically: The email header of the email sent to "+subscribe" goes like this: (the "dots" are gmail formatting -- AFAIK the actual email uses <> like a normal.....)
From: Jane Doe via Our Website Name • admin@...
Reply-to: Jane Doe • jane@...

..........
So for whatever reason, the submitting user's email is handled the way I hoped, but not the display name -- like, the submitting user gets an email from Groups.io saying, "Please reply to this email to confirm your subscription request" or whatever (yay), and when the user replies, they're added as a pending group member and the group moderators get a notification email. ...But, the display name isn't populated.

To be honest, I was surprised it worked, given that the email isn't "from" the submitting user, it's just the "reply-to" that the submitting user's email address.  It's also interesting that the Display Name isn't populated with "Jane Doe" OR "Jane Doe via Our Website Name".

............
Does anyone know the exact way the "from name" in an email sent to a "+subscribe" email address needs to be formatted to make sure it populates the "Display name" on the resulting user account.....?

(Or, maybe there's a different question I should ask -- if so, pls feel free to answer That Question instead :D )

Thanks so much, everybody!
-Alison


Re: Example signup form?

ajomccauley@...
 

(Still wondering about that last thing if anyone has any insight!) (But also -- )

Looks like we won't be using Direct Add after all, they want to approve subscription requests.  I mean, the eeeeeasiest thing to do is use a webform on our website (it's Drupal so there's a webform module), send the webform submission to *both* the "+owner" and the "+subscribe" email addresses, ...and that's seriously it, we can collect whatever info we want in the webform (which they only want to have to check against their own records of who's a member of the community IRL), and the user will have a membership request pending approval.

The automatic email from the webform submission is like, sort of from the submitting user's email address, and in my testing, it seems to work great -- but the Display Name isn't getting populated, and I can't figure out why.  But that's probably out of scope for this thread -- I know I started the thread, but still :)  I'll copy into a different thread.  (But/And still would love advice on the username/password question I posed in my previous message! :)

Thanks,
Alison


Re: BREAKING CHANGES #important

 

On Fri, Nov 22, 2019 at 10:59 PM <ajomccauley@...> wrote:
Hi and thank you!  Did the change happen at the end of September?  I'm new to groups.io and the API, poking around, and when I ran the login object, it included a token field with a super long string in it -- but I see the cookie authentication info in the documentation, so, just wanted to check.  Thanks!
_._,_._,_

That's legacy and I've just removed it.

Thanks,
Mark 


Re: Uploading Pictures via API getting inadequate_permissions #api

Eric di Domenico
 

If this is any help, here is the Raw request generated by PAW. I am uploading to an album created by the same user.
POST /api/v1/addphotos HTTP/1.1
Content-Type: multipart/form-data; charset=utf-8; boundary=__X_PAW_BOUNDARY__
Cookie: groupsio=XXX
Host: groups.io
Connection: close
User-Agent: Paw/3.1.9 (Macintosh; OS X/10.15.1) GCDHTTPRequest
Content-Length: 11157

--__X_PAW_BOUNDARY__
Content-Disposition: form-data; name="csrf"

1691885163244178649
--__X_PAW_BOUNDARY__
Content-Disposition: form-data; name="album_id"

212217
--__X_PAW_BOUNDARY__
Content-Disposition: form-data; name="fileupload"; filename="image.jpeg"
Content-Type: image/jpeg

ÿØÿàJFIFHHÿáîExifMM*bj(1r2„‡i˜HHPixelmator 3.8.82019:11:10 21:11:050221‘ 0100 ô w¤ÿá	öhttp://ns.adobe.com/xap/1.0/                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ÿâ4ICC_PROFILE$applmntrRGB XYZ á
 acspAPPLAPPLöÖÓ-applÊ•‚%M8™ÕÑê‚
descüecprtd#wtptˆrXYZœgXYZ°bXYZÄrTRCØ chadø,bTRCØ gTRCØ descDisplay P3textCopyright Apple Inc., 2017XYZ óQÌXYZ ƒß=¿ÿÿÿ»XYZ J¿±7
¹XYZ (8ȹparaffò§
YÐ
[sf32BÞÿÿó&“ýÿÿû¢ÿÿý£ÜÀnÿÀwô"ÿÄ	
ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚	
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ	
ÿĵw!1AQaq"2B‘¡±Á	#3RðbrÑ
$4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÛC00D000D\DDDD\t\\\\\tŒttttttŒŒŒŒŒŒŒŒ¨¨¨¨¨¨ÄÄÄÄÄÜÜÜÜÜÜÜÜÜÜÿÛC"$$848`44`最œææææææææææææææææææææææææææææææææææææææææææææææææææÿÝ ÿÚ?Ï¢—VæbQKE1´PQKE%´PE-”RÑ@	E-QKE%´´ÚZZ(”RÑ@	KKE%´PQN¢€ŠZ((¥¢€ŠZZ@6––ŠJ)h ¢—Ph§bŠmêJ`%%:Šmê(´RÒÐh§Q@
¢E6Šu€mêJJ)h ¢–ŠÿУEµ¹”RÑLŠZ((¥¢€––ŠJ)h ¢E6––ŠJ)h ŠZ((¥¥ bQKF((¥Å.(´´¸¥Å7bŠ(¸¥Å--7bE Š\RÑ@	Š1N¢Åê(¸¢EF)Ôb€ŠLS±E7˜§â“Àm§QŠ7bŠ1@Æъu âŒS¨¤qE:Šm§bŒPqE;˜ ÑNÅ ÿÑ¥KIŠZÜÌ)h¥¦!(¥¥ ÒÒÑ@	E-”´´PQKK@
¥¥Å”RÒâ€E:ŠJ)ih(¥¢‰E:ŠJ)h ¥¥£€J)Ø£Ú\Râ—ÜQŠv(ÅŠ\RÒÐqF)ÔPqF)ÔPqIŠ~( C1E;b€E;b˜
¢Š1@
¢Š1@
¢ŠJJ)qF)”RâŒPh§bŒPh§bŠm¥¢€?ÿÒ«Š1N£¹Ú)Ø¥Å6–ŒR ZZ`%´´ÚZZ((§Q@	E-”S±F(´´¸£”S±F((Å.)hÜR▖€Š1N¢	Š)iq@	F)iq@Æъv)q@
ŧbŒPqKŠ\R 1NŤqF)Ø£ÌQŠ~)1LâŒS±I@†âŠv(Å7S©1@	F)h ÑN¢€F)ÔPhÅ:Šn(§Q@
Å´PqF)ÔPÿӆŠZ+ ÈJZZ)”bŠ1@
ŧâŒP(§â“”´˜£4´¸¤È§S1F)ih(¥¢€S¨ ¢–ŒPQN¢‰E-- ŠZ\PiiqF(1KŠZZ&(Å-- Š1NÅ â—´b€bŠ1@ÆâŒS¨ âŒS©(ÜRbŸI@
Å&)ô”Ä7S¨ ÑN¤ ÑNÅ ÑNÅ ÑNÅ ÑN¤ ¤§Q@
¢–ŒPÿԎŠu¹”´RÐE-QŠZZn(Å;¸ b¢ŸŠ1@l¤*{TØ£ï.æî*lRbŒ
>šSҀ RÓF{Óè1F)Ôb€Š1OÅ âŠv(Å%´´”Rъ@%--(¥¥Å%¸£€J)qKŠ6Šv( ÑNÅ ÑNÅ QNÅ%1
¢Š1@†ÒS¨Å6Šv(Å6Šu ÑNÅ ÑN¤ ÑN¢€Š1N¤ âŒS¨ÅÿÕg¸›qKZÜÌ^)hŠw(§b—JZ\Q@(Å--&(Å:–Å§b—ÌRb¤Å¢àGŠ1RbŒQp#ŧâŒPqF)Ø¥Å7bŠ1@
ŧâŒP1F)ø£Ú1NŠŧbŒP11KKŠ\R1F)Ø¥Å+Œf(Å?b‹€ÌQŠ~(Ř£üQŠf(Å?b‹)1Rb“f(Å?b˜âŒSñIŠn(Å;b‹€ÜQŠv)qEÀf(Å;b€Š1NÅ âŒS±F(”S±F(´S±F(ÿÖ0ivšŸh§m«$®ŠwÍSâŒP<Ó±RbŒS¸†bŒSñKŠwÌQŠ~(Ř¥§b—\ÒÒâšN –š§=iüP1)qF”àQq‰Š6Ònö4ìš.Š1NÏ­7z÷4\VQŠ\Š2	Š\S‡4¸¢à3bŸŠ1EÆ3b¤Å&(¸Xf)qNÅ.(¸Å.)Ø£®bŠ1NÅ+Œn(Å?˜¥pŠ1Oŧq‘âŒT˜£®1F)ø£\ñIŠ“bÄGŠ1Rb“\ñF)ø£\Dx¥Å?b‹…†bŒSñIŠ.1IŠ“˜¢à3bŸŠ1NàGŠ1RbŒR¸Xb¤Å¢áb<QŠ“b‹ŽÇÿ×¹Š1NÅ.)ÜVŠ\S±KŠ.Š\S±F(¸Xn(Å?¸¢áb=´b¤Å.(¸X‹b¥Å&Ú." Ñ´—b‹…ˆJzT,²Ž•sb‹…ŠäsLi¤
im­FУv¢ác8M)=EKæIíSýéQ4h8¢áa|Æ4ìúÓ…àÒîÑqؓ9íMÁëH)Û¸¢áa†G¢àŽ1šíÜ{Ô"93À§p±¤²n*LÖxYG^)áœw¥p±{"—Š¬²˜=+…‡œ

&ïj7ûQqØv)qQî4àÄö¥påŠ\P3ޝŠ.bŠ\R¸ŧbŒQpŠ1NÅ¢à7bŠ1EÀf(Å?˜§pŠn)ôb‹ˆf(Å?b‹€ÌQŠv(Ř£üRb‹€ÌQŠ~(Ř£üQŠ.Š1N¢‹€ÜQKIEÀJ)h¢àÿÐÑ¢¡ó¡ü©ÂU÷üHÉiqQïZx`zQp°¸¥¤È¥È¥p°RÑE…¥¦ÒÑp°´´Ú3EÂèÅ&hÍ+……Å£4f‹…ƒb—4QqØnÑHcCÔSè¢áb/"?JoÙÓµX¢‹Uâ
2£5Áê¤Uê1G0BGޝˆÅY£•À¬¢8ÿ%*m£µ.(¸È|•£Ê=\D>X¥òÅKKEÀˆF´»EIE˜¥Å?b‹€ÜR▖‹ˆn(Å;b•Àn(Å;b‹€ÃÅ7pïÅKŠ1EÇ¡E->’‹€ÌR`ԔQqâŒSè¢ãŠLSèÅ>aXf)1O¤£˜vŠLS裘,3S¨¢áa”S±F(¸¬2ŒS±E†ÑKEÿÑAz¿Ý?;í©ýÓX¾rûÑ秽>T.fm‹ØÿºiÂö/CX~r{ÒùÉG*36þÝ¡¥ût^†±<Ôõ¥ó֎D.fmýºzp½ƒÔþU‡½}E.à{ÑȇÌÍÁy÷¿JwÚà?ÇXy¤Þ½È¥ìÐs›ÿj‡û⏴ÃýáXbúŠvð}){4>s{íxQöˆÏÖïaFáéG³sÏOÈӄÈ{þ|W=»#Š˜Þ§ó¥ìÇÎt!ÁèsKº¹Ï1»ùÓ¼é?¼3KÙ±ó£¢ÝFã\÷Ÿ'÷çJ.&ìçó¥ìØùÑÐî£p¬sqýóJ.n?½ü¨öl9Ñ¿º“±¬/´Üÿ{ùS…ÕÐõü©{6ÈÛó`¬q{69þ¿mcÕVŽF>h›`§ošæ‘S£?Ï¡¨zn;\»‘Kš§±{3ƜösúWRÞhȪ„Ê;çðÿëÓÏèÔbå/æ—5•æÜçýXǵ;̟ÙúÑf4óKYž|ê‘ùTmy:ŒáqõÿëÓ³‰¯KX?ÚOž@ü
YŽöG裏~hqhV¾Æµœ.ä捿SÅꍭùRÔ9Kԕ\\ÆFNGáM7–àáŸߊWb±jŠ„M«øÓ>Ñ÷Çæ)\v,QU
Ä$ðëùÑç!à7åL|¥ª3U<ÜiÂ_\Ñqò2Æi3Pù¢”=R\Òf£ßIæâ•Ã”–Š}¨¸ì>Šuè¸X’ŠƒÎŒzS"Ž¤
abZ*-âÈ=h¸ìKEQ{ëdêãð愽·“…q“Û¥=D]¢«ˆÁ`֓í0ÿ}1H,ÿÒÇû#}Z_±¿÷–­ˆÀ§mKìoýå£ìRy:½´zS‚J.3þÅ'÷—ó¥û¿Þ_δ6¯¥.Õô¢ác;ì2ú¯çGØfõ_δ¶¯¥;ýÚ.0:qVRÎi:ãÞ´¼˜IÉAS*¢€àQp±•ýŸqþÏçGö}Ï üë_åô£+ýÚWŒìûŸAùÑýŸuè?:ÙvÃҎ`±ýŸuýÑùŠO°]ÿwõ·¸zSƒ/¥.`±…ö¿îþ¢°Þwõ¾zS·J9‡Êsßa»î¿¨¤ûß÷?Q]&áFáKœ|§7ö+±ü'ó}Žïû‡ó®—p¥Ü(çC˜û%×÷çGÙnÇD?tù£4s‡!̋kÁÑX~4{ÃÕXþ5Óf—4s‡)ˋk±ÑZœ ½ë§´¹Ã”å~Ïy×kÒù7˜Æ×ýk«¢Žqòœ™†óº¿ëIåݏáÖºê(ç)ÈþF·}0ÿ­uÜRñG8rœqŠàõW?¦ù3q¿#]¥->på8¯&_î7äi|¹¿ºß‘®Ò–—8rœVÉ¿ºß‘¦ì“û§ò®ãð£J9Ôᶸìinà×uéIéG8rœ7ÍïIÍwX_JnÔôs‡)ÂG"—sg95ÛmAü"“dÝ•>qrœ_˜ùݸç×4¾l„ä±ÏÖ»-‘ÿt~Tlû£ò£›È-æq›ßÔþt¾l§øÏç]‰HU¦˜¡?À¿£›È,r"iGÛó¤óeÎwNµÖùq!HmíÏð/åG2ìg(³J£
ì>†—ÏŸûíùšêEµ·÷ò¦›KSÿ,֎eØ,Î_Η9ÞÙ>æƒ$Áb~¦ºo±ZÏ1A³´?òÍió.ÁfrÜѓ]?Øm¸?Z>ÅkŸ¸(æB±ÌäúšLšê>Åiÿ<Å!²µÿžbŽd§/EtcmÙæh6ÝÐ~fŸ2ÝÑý†ÛûŸ©£ì6ÿÜýMÈ,ÿÓfÊvʛ RÊvʗ´€‡e.ʛ¸ d;)vT¸¥âl¥ÙR▀!ÙFʟb‘l£eJ;ì¥	R◊ˆ-;h§ÒÒÚ]´ú8¤;ÛF)ÜQ@\n(Å8šN(‰Š1N͐\LS±@4´áŠZ)iÄ¢—4¼P+Å-/´Ú)ÔPi–Š(¥âŠJ)h ¤Å:’€ŠLSè¢àGŠ0iôS¸àѶŸEÛI¶ŸIEØXnÚM´ú(»ÛI¶ŸEadG¶´úJwbÐnÑI´Sé(»›i6Óé)ÜV¶´ê(¸ÿԚ–£È£u\Òæ¢É¥É¥`¹.hÍGš7{Ñ`¹&isQî÷¥Ü(°\’—5E’æ—5ê7}(°îKš\Ô[4¬%ͨw{Òo½“î¤Ýõ¨<Áê:MޔX.XÝìi7úñõª¥ýqI»=üÍË^`õyž¤UmçE4¹¢Árѐv"€ãÖªùŒŠÇ·ó£”.[óޗxì
R-î3Jõ¥Ê.‡¥ßëUváþsG(îZ
î)wUPã֝ºŽP¹g}¾•O§éK“þE+É÷Rî_qõ§n÷¢Ár|њ‡#֗>ôX.Mš\Ô9¥Í+ÉsFEEš3E‚ä»…¨·Q“E‚乤ÍG“FM’æ“5hÈ¢ÁrLŠ7T[…¨°\“4™¦n4dÑ`¸üњfi(°\~hÍ34f‹ÇfŒÓsFh°\uÜњ,IMÍ¢Áqh¤Í&h°\Z)3Fh°\ÿÕ2}M¨r´¿/§ëT"\Š]ËQdz
]Ãڀ$Ü=)w{
qìiw5LŸJ2j,¿­ïQadџz‡'»?,&Éõý)7{š‹ô¼zÑ`¸ýÃÔѕõ4̏ZL¯½\¯©¤Ü;
f妓éE†H\öÍ0—=Í÷¦–>ÔXËã­œw¦Œ{S¹4¬,G­3¿4êJ,¥.}I¤ÅX.ŽÄþt˜ŒÀR…õX.8))ùÇZ¸§d
,º¤Ô;Å/˜(°îKšQPg÷¨°\›'ޝŸ­WÏûTàO÷…+ÉÁúÓ³õ¨?púÑ`&Ýõ£}G‘ëúÒäö"•†?½½é¹j>j,·
\Šv:ÒnZ,¹´™Íñý(ÝE€’Š‹4™ö¢Â¹6E&~µG¥¢Ár]Çޗ5hÿ=h°\—w½&}é™úѻދýÔdÓ7ZLûÑ`$͵}é3E€—"ŒŠ‹q¥É¢ÁrLš2j>h¢Áqù£4Ìњ,óFi™¥ÍÿÖ©Å/ÉQdѓWbI²žô»“Þ¢Í/á@oOz7/¥34nÄ?p¥ÝLÈ£pô ïj]ÍLÝíK¸ú
vM.M3-FZ€– óLËQ– äŽÔn¨÷µÍ!â—zŒ9¥Þޔ Å.j-Çғ>‹.i3QäÒäÓ°ÝíFïjMôy‚¸Råi¾`¥Þ´¹_Jp+éMÞ´›Çc@äQ¸
‡½ýè°yƒÒ1}*2—Ì”X	w§¥.õô¨·J7JV6áK¼zT;‡¥.å÷ 	7¯¥—Ò™¹}M–€”÷£÷Þ4ܯµ_Zc³S²}ECòw4b?Z@M¹ýE›Ö¡Âö4~T.O©¥ÍCš?`M»Ú“uC‘I¼zQ`&Üi2*-þÔn4XD»….ïz‹qîhÈõ¢Ã$Ýõ£4ÍŒûÐóíK“ëQäûQ–ô.OµÔ_P(ù}(°à{QÇ¥E”ô4e=H¢ÀK¸Š7š‹pìÔ¹Ïz,›šŒµGƒF
+ÿ×Ï£4ÚZЁ۩w
gP÷-.åô4Ê3@Ü=(Ü})›©sõ e½(ËRf—4e½hÜE._Z<ÃKæ{RezMÉë@ó=…/˜=*=ëFáí@o†ãÐÔ{—ڍޘ 	w{RïµAÉ¥ÅKæûQæJ‡Š(mëéI¹*0hl­&G†ô£ҀŠ\S)r}(ؼS9£ÔП/ ¥Èô¨¶ûš6Ð2]Õ>”´€“4¼T9£qõ 	¸õ£Z‹szŠ2ÞÔ›Š0*š?›F=
EFh\>j‹qõ£qõ 	>ojOš›“Fâ(ýÏK½ª=ç֏0ЛÛҍþÔÏ2ôý⌭7rÒåhß-{Sr´|žôÿʓŸZåõ¤ãր$É£4Ìûњ`?&ŒÓ2hÍI‘G¢Í 	qF*,њ@ÿÐËɥɦњЁôb›š3@À£›š\а(ü)¹4dÐóG>´›&M;>ô™÷¤Í.E÷dÒgéFhrhÍ&is@ÒÑ@	Íî(È üiÙ>´™¤É î>´o>µÍGÍ@n¤ÝLç֊~ïz7Zg¹]ƍÍIš3@ËQ“MÍüѸzÓphÁ¤÷ûÒùžõ(Á 	7ý)3ì)˜>”sé@Çþ¸¨ù¥É âŒ{Ó3Fã@QøÔ{¥¥øÒSwJ3Lf—4Ú?
ãG”™&ö¨÷Rn D¸££Í.hþhÉõ¦dR怓K“MÈ£Š~Oµ4ÌR`МѓQr)rhù£4ÌûRçڀ?ÿÑÇ旚J+B£"’ŒÐäQº“"Ž(sFi8£"€—ñ¤Í&hÜzÑÅ74¼PñIÅ£fŒš\Q@	–£-KšLÐüÔ¼ÓsIš}Îh恒nn&E¨èÍIEGš^hø£ÊZv)pi´fæŽi2(È ȥȦäRf€$Í.ê‹&Ô.áFáQîZ2´}¦no~(ç֙ºŒÐù£&™“FM04gړu Í.i¹ö£u:Šnê]€Fi»….á@š3I‘F/>´Ÿ5´¿'4àM'q@ÜiwT4&ê7Tx4`ÐÿÒÅÝFãIÍՒ.M4fŒÐKIšJ`:Šm¼QÅ%´´Ú(ԙ¤¢€š3M¢€š8¦æ—4ê1MÍ-.(¤¢€ŒÒ`ÑÍ.h¤¢€Š)9¢€Fi(¤æŒÒdÒf€GÜÒ怊LÑÅ.O­ÒRÐQK‘FE¹™ZO–€Å܊2(y£&“"—"€
Ô¹¦äQLfŒšm/4¹4RdњZ\Óh怸Q¹i´dPò=h晑K¸P°hæ“p£p É£uQŠ]Ôn¤Å ÿÓÄɤæ“&Œš²EæŠNh ¢’–€
(¢€
(¢€Šm´bŠ(Å´S¤¢Š@QE¥Í%ìѺ›E?uÊ(ùdS3E;4f›E;4f’’€E6Š}¦Q@¢›š3@£4ÜњwqMÍ.E/qI‘KÅQÅQ@qIŠ(h¤£´RQ@š2i( fŠm-0ŠJZ(£˜4ìёL撀%ÝFê‹4f€?ÿÔÁ£4”U’;4f›E;4RfŒÐÑIE.hÍ%ìÑM¥Í-™£4ê)¹¤Í:Šm-QEQEQI@KM¢€E6–€
3E¹£4”PEPEPEPE£QF)h(¥¢€ŒÒÒPæŒÒQ@Kšm æ—5hÍIÅis@¢›š3@¢›š3@ͦæŒÐ³E%¼QÅ%%ÿÕÀ¢Š*É
(¢€
(¤ ¢’ŠZZm´RQ@E%´QE-”P³E6ŠuÚ(Ù¢›E-”´”QE-”PÑIE-”PÑIKHaKIE0ŒÒfŠ\ÑE(ÍPš)( ¤¢Š(¢Š(¢–€ŠZJ(¢ŠZ)´P¨¤¢€Fi( Í¤¢€?ÿÖç袊¢BŠJ(h¤¥ Š)i€”QEQEQEQE
)( BÑIK@Q@Q@¢Š@QEQE
(¢€
(¢€ŠJ(h¢Š`QE 
(¤¦æŠJZ)i( BÑEQE´RQ@IKE%´PQKE%Q@”PњJ(ÿÙ
--__X_PAW_BOUNDARY__--


Re: Example signup form?

ajomccauley@...
 

Oops I replied without refreshing the page first -- thank you, Tim!

Do y'all like, use your own email/password combos for this stuff (and then figure out securing the info depending on your server/software situation)?  I'd love to know if that's the norm, b/c right now I feel like I've *got* to be missing something, but maybe I'm not...


Re: Example signup form?

ajomccauley@...
 

Hi Ken, thank you *so much* for sharing your code, and re-urging me to get Postman, which I just did :)  If/when I figure more stuff out, I'll share back here!

(The reason for all this, for us, is that (a) the group owners want to collect more info than just email address, even though the other info won't go into the person's member record in groups.io (it's for verifying who people are); and, (b) they'd really like to have the Display Name populated from the start.  I'm not sure if those are super common needs or if they're unusual, but, that's what I'm trying to figure out if I can put together for them.)

Thanks again!
-Alison


Re: Example signup form?

Timothy Fong
 

When you authenticate against the login end point, your client will receive a cookie. Each subsequent request that uses that cookie let’s you perform the other actions.  Postman has that option to mimic your actual client.



On Sat, Nov 23, 2019 at 5:16 PM sierragamers via Groups.Io <sierragamers=kensblog.com@groups.io> wrote:
Greetings Alison,

My application is probably very different. I'm using Dot Net from the server side. That said, I'm putting some code at the end of this message. 

The thing I struggled with was that I couldn't get dot net to post to Groups.IO's servers. I had a couple of challenges that were easily overcome, but only after I discovered what they were. Specifically, the authentication is two-fold; the CSRF .. AND, the cookie that is obtained when you log in. Being server side, I had to create an empty cookie container, collect a cookie on the login and then give it back later for the DirectAdd call. My second challenge took a day to solve. Apparently Groups.IO's servers want TSL1 or 2, and dot net was trying to communicate with TLS 3. All I knew was the call was inexplicable timing out. Argh.

Anyway .. there's no greater tip I can give you than to download Postman. https://www.getpostman.com/downloads/ I never would have figured it out otherwise. You really need to make the calls from Postman first to see the behavior. 

Anyway ... here's some excerpts from my code:

This is the method that does the login .... (It's not likely to be much help)

 
    Function loginToGroupsIo(ByVal email As String, ByVal password As String) As GioInfo
        Dim paramsInBody As Specialized.NameValueCollection = New Specialized.NameValueCollection
        Dim paramsOnUrl As Specialized.NameValueCollection = New Specialized.NameValueCollection
 
        paramsOnUrl.Add("email", email)
        paramsOnUrl.Add("password", password)
 
        Dim uri As String = "https://groups.io/api/v1/login"
 
        Dim cookieContainer As Net.CookieContainer = New Net.CookieContainer
        Dim rtn_generic As WpToolsV2.Rtn_generic = wp.GioPostHtmlv2(uri, paramsInBody, paramsOnUrl, "", cookieContainer)
        If (rtn_generic.success) Then
        Else
            reportF.Append(rtn_generic.reason)
            Return Nothing
        End If
 
        Dim js As JavaScriptSerializer = New JavaScriptSerializer
 
        Dim loginObject As Object = js.DeserializeObject(rtn_generic.reason)
        Dim userObject As Object = loginObject("user")
 
        Dim gi As GioInfo = New GioInfo
        gi.loggedInUserId = userObject("id")
        gi.csrf = userObject("csrf_token")
        gi.cookieContainer = cookieContainer
        gi.userObject = userObject
        gi.loginObject = loginObject
        Return gi
    End Function

And the code for the DirectAdd:

 
    Sub addViaDirectAdd(ByRef gi As GioInfo,
                         ByRef listOfEmails As List(Of String))
 
        Dim rtn_generic As WpToolsV2.Rtn_generic = Nothing
        Dim js As JavaScriptSerializer = New JavaScriptSerializer
        Dim paramsInBody As Specialized.NameValueCollection = New Specialized.NameValueCollection
        Dim paramsOnUrl As Specialized.NameValueCollection = New Specialized.NameValueCollection
 
        paramsInBody.Add("group_id", gi.groupid)
        paramsInBody.Add("group_name", gi.group_name)
        Dim newLine As String = vbCrLf
        Dim f As FastString = New FastString
        For Each email As String In listOfEmails
            f.Append(email & newLine)
        Next
 
        paramsInBody.Add("emails", f.concat)
        paramsInBody.Add("csrf", gi.csrf)
 
        Dim uri As String = "https://groups.io/api/v1/directadd"
 
        rtn_generic = wp.GioPostHtmlv2(uri, paramsInBody, paramsOnUrl, "", gi.cookieContainer)
 
 
        If (rtn_generic.success) Then
        Else
            reportF.Append(rtn_generic.reason)
            Return
        End If
 
    End Sub

Something worth noting ... 

Login is simple -- the parameters go on the URL. All of the other calls use the parameters inside the body of the email.

Here is the source for my actual method that does the posting. It won't help you .. but .. someone down the line might find it useful...

There is a lot of useless code within the method. I struggled to get it to work, so I was logging everything after every call so I could see what was happening. And, the code is a bit messy because "posting comes in various flavors" and I tried them all. At one point I was posting as a multi-part form, etc. 

Anyway .. I hope all this helps. Good luck!

 
    Public Function GioPostHtmlv2(
ByVal uri As String,
ByVal parametersInBody As Specialized.NameValueCollection,
ByVal parametersOnUrl As Specialized.NameValueCollection,
ByVal accessToken As String,
ByRef cookieContainer As CookieContainer) As Rtn_generic
        Dim f As FastString = New FastString
        f.Append("URI: " & uri & vbCrLf)
 
 
        ' make a parameter list
 
        Dim parametersf As FastString = New FastString
        Dim allKeys() As String = parametersOnUrl.AllKeys
 
        Dim firstTime As Boolean = True
        For Each key As String In allKeys
            If (firstTime) Then
                firstTime = False
                parametersf.Append("?")
            Else
                parametersf.Append("&")
            End If
            parametersf.Append(key & "=")
            parametersf.Append(HttpContext.Current.Server.UrlEncode(parametersOnUrl(key)))
        Next
 
        Dim postData As String = parametersf.concat
        If (postData Is Nothing) Then
            postData = ""
        End If
        uri &= postData
 
        f.Append("URI with Parms: " & uri & vbCrLf)
 
        System.Net.ServicePointManager.SecurityProtocol =
                        SecurityProtocolType.Tls11 Or SecurityProtocolType.Tls12
 
        Dim rtn As Rtn_generic = New Rtn_generic
 
 
        Dim request As Net.HttpWebRequest = Net.WebRequest.Create(uri)
 
        request.ContentType = "application/x-www-form-urlencoded"
        f.Append(request.ContentType & vbCrLf)
 
        request.Method = "POST"
        request.KeepAlive = True
        request.Credentials = Net.CredentialCache.DefaultCredentials
        request.PreAuthenticate = True
        request.Accept = "application/json"
        If (accessToken = "") Then
        Else
            request.Headers.Add("Authorization", "Bearer " & accessToken)
        End If
 
        request.CookieContainer = cookieContainer
 
        Using requestStream As IO.Stream = request.GetRequestStream()
            parametersf.Reset()
 
            allKeys = parametersInBody.AllKeys
 
            firstTime = True
            For Each key As String In allKeys
                If (firstTime) Then
                    firstTime = False
                    parametersf.Append("")
                Else
                    parametersf.Append("&")
                End If
                parametersf.Append(key & "=")
                parametersf.Append(HttpContext.Current.Server.UrlEncode(parametersInBody(key)))
            Next
 
            postData = parametersf.concat
            If (postData Is Nothing) Then
                postData = ""
            End If
            f.Append("Parameters in the body:" & vbCrLf)
            f.Append(postData & vbCrLf)
            Dim parameterBytes As Byte() = Text.Encoding.UTF8.GetBytes(postData)
 
            requestStream.Write(parameterBytes, 0, parameterBytes.Count)
 
        End Using
 
        Dim response As Net.WebResponse = Nothing
 
        Try
 
            response = request.GetResponse()
 
            Using responseStream As IO.Stream = response.GetResponseStream()
 
                Using responseReader As New IO.StreamReader(responseStream)
 
                    Dim responseText = responseReader.ReadToEnd()
                    Diagnostics.Debug.Write(responseText)
                    rtn.success = True
                    rtn.reason = responseText
                End Using
 
            End Using
 
        Catch exception As Net.WebException
 
            response = exception.Response
 
            If (response IsNot Nothing) Then
 
                Using reader As New IO.StreamReader(response.GetResponseStream())
 
                    Dim responseText = reader.ReadToEnd()
                    Diagnostics.Debug.Write(responseText)
                    rtn.success = False
                    rtn.reason = responseText
                End Using
 
                response.Close()
 
            End If
 
        Finally
 
            request = Nothing
 
        End Try
 
        rtn.log = f.concat
 
        Return rtn
    End Function


--

Inline image

Tim Fong
 
p: 415-508-6888

e: timfong888@...

 
 


Uploading Pictures via API getting inadequate_permissions #api

Eric di Domenico
 
Edited

I keep getting an inadequate_permissions when trying to add photos via the api.

Logging in and creating an album work but not adding the photo.

curl "https://groups.io/api/v1/addphotos" -H 'Cookie: groupsio=XXXX' -F "csrf=1691885163244178649" -F "album_id=212217" -F fileupload=spec/fixtures/image.jpeg && echo $?
{"object":"error","type":"inadequate_permissions","extra":""}
0

I've tried this using a Ruby script as well and I get the same error. I have also run this using the Paw.app... same error

Am I doing something wrong or is the add photos not working?

Edit: XXX used instead of actual cookie content of course.


Re: Example signup form?

sierragamers@...
 

Greetings Alison,

My application is probably very different. I'm using Dot Net from the server side. That said, I'm putting some code at the end of this message. 

The thing I struggled with was that I couldn't get dot net to post to Groups.IO's servers. I had a couple of challenges that were easily overcome, but only after I discovered what they were. Specifically, the authentication is two-fold; the CSRF .. AND, the cookie that is obtained when you log in. Being server side, I had to create an empty cookie container, collect a cookie on the login and then give it back later for the DirectAdd call. My second challenge took a day to solve. Apparently Groups.IO's servers want TSL1 or 2, and dot net was trying to communicate with TLS 3. All I knew was the call was inexplicable timing out. Argh.

Anyway .. there's no greater tip I can give you than to download Postman. https://www.getpostman.com/downloads/ I never would have figured it out otherwise. You really need to make the calls from Postman first to see the behavior. 

Anyway ... here's some excerpts from my code:

This is the method that does the login .... (It's not likely to be much help)

 
    Function loginToGroupsIo(ByVal email As String, ByVal password As String) As GioInfo
        Dim paramsInBody As Specialized.NameValueCollection = New Specialized.NameValueCollection
        Dim paramsOnUrl As Specialized.NameValueCollection = New Specialized.NameValueCollection
 
        paramsOnUrl.Add("email", email)
        paramsOnUrl.Add("password", password)
 
        Dim uri As String = "https://groups.io/api/v1/login"
 
        Dim cookieContainer As Net.CookieContainer = New Net.CookieContainer
        Dim rtn_generic As WpToolsV2.Rtn_generic = wp.GioPostHtmlv2(uri, paramsInBody, paramsOnUrl, "", cookieContainer)
        If (rtn_generic.success) Then
        Else
            reportF.Append(rtn_generic.reason)
            Return Nothing
        End If
 
        Dim js As JavaScriptSerializer = New JavaScriptSerializer
 
        Dim loginObject As Object = js.DeserializeObject(rtn_generic.reason)
        Dim userObject As Object = loginObject("user")
 
        Dim gi As GioInfo = New GioInfo
        gi.loggedInUserId = userObject("id")
        gi.csrf = userObject("csrf_token")
        gi.cookieContainer = cookieContainer
        gi.userObject = userObject
        gi.loginObject = loginObject
        Return gi
    End Function

And the code for the DirectAdd:

 
    Sub addViaDirectAdd(ByRef gi As GioInfo,
                         ByRef listOfEmails As List(Of String))
 
        Dim rtn_generic As WpToolsV2.Rtn_generic = Nothing
        Dim js As JavaScriptSerializer = New JavaScriptSerializer
        Dim paramsInBody As Specialized.NameValueCollection = New Specialized.NameValueCollection
        Dim paramsOnUrl As Specialized.NameValueCollection = New Specialized.NameValueCollection
 
        paramsInBody.Add("group_id", gi.groupid)
        paramsInBody.Add("group_name", gi.group_name)
        Dim newLine As String = vbCrLf
        Dim f As FastString = New FastString
        For Each email As String In listOfEmails
            f.Append(email & newLine)
        Next
 
        paramsInBody.Add("emails", f.concat)
        paramsInBody.Add("csrf", gi.csrf)
 
        Dim uri As String = "https://groups.io/api/v1/directadd"
 
        rtn_generic = wp.GioPostHtmlv2(uri, paramsInBody, paramsOnUrl, "", gi.cookieContainer)
 
 
        If (rtn_generic.success) Then
        Else
            reportF.Append(rtn_generic.reason)
            Return
        End If
 
    End Sub

Something worth noting ... 

Login is simple -- the parameters go on the URL. All of the other calls use the parameters inside the body of the email.

Here is the source for my actual method that does the posting. It won't help you .. but .. someone down the line might find it useful...

There is a lot of useless code within the method. I struggled to get it to work, so I was logging everything after every call so I could see what was happening. And, the code is a bit messy because "posting comes in various flavors" and I tried them all. At one point I was posting as a multi-part form, etc. 

Anyway .. I hope all this helps. Good luck!

 
    Public Function GioPostHtmlv2(
ByVal uri As String,
ByVal parametersInBody As Specialized.NameValueCollection,
ByVal parametersOnUrl As Specialized.NameValueCollection,
ByVal accessToken As String,
ByRef cookieContainer As CookieContainer) As Rtn_generic
        Dim f As FastString = New FastString
        f.Append("URI: " & uri & vbCrLf)
 
 
        ' make a parameter list
 
        Dim parametersf As FastString = New FastString
        Dim allKeys() As String = parametersOnUrl.AllKeys
 
        Dim firstTime As Boolean = True
        For Each key As String In allKeys
            If (firstTime) Then
                firstTime = False
                parametersf.Append("?")
            Else
                parametersf.Append("&")
            End If
            parametersf.Append(key & "=")
            parametersf.Append(HttpContext.Current.Server.UrlEncode(parametersOnUrl(key)))
        Next
 
        Dim postData As String = parametersf.concat
        If (postData Is Nothing) Then
            postData = ""
        End If
        uri &= postData
 
        f.Append("URI with Parms: " & uri & vbCrLf)
 
        System.Net.ServicePointManager.SecurityProtocol =
                        SecurityProtocolType.Tls11 Or SecurityProtocolType.Tls12
 
        Dim rtn As Rtn_generic = New Rtn_generic
 
 
        Dim request As Net.HttpWebRequest = Net.WebRequest.Create(uri)
 
        request.ContentType = "application/x-www-form-urlencoded"
        f.Append(request.ContentType & vbCrLf)
 
        request.Method = "POST"
        request.KeepAlive = True
        request.Credentials = Net.CredentialCache.DefaultCredentials
        request.PreAuthenticate = True
        request.Accept = "application/json"
        If (accessToken = "") Then
        Else
            request.Headers.Add("Authorization", "Bearer " & accessToken)
        End If
 
        request.CookieContainer = cookieContainer
 
        Using requestStream As IO.Stream = request.GetRequestStream()
            parametersf.Reset()
 
            allKeys = parametersInBody.AllKeys
 
            firstTime = True
            For Each key As String In allKeys
                If (firstTime) Then
                    firstTime = False
                    parametersf.Append("")
                Else
                    parametersf.Append("&")
                End If
                parametersf.Append(key & "=")
                parametersf.Append(HttpContext.Current.Server.UrlEncode(parametersInBody(key)))
            Next
 
            postData = parametersf.concat
            If (postData Is Nothing) Then
                postData = ""
            End If
            f.Append("Parameters in the body:" & vbCrLf)
            f.Append(postData & vbCrLf)
            Dim parameterBytes As Byte() = Text.Encoding.UTF8.GetBytes(postData)
 
            requestStream.Write(parameterBytes, 0, parameterBytes.Count)
 
        End Using
 
        Dim response As Net.WebResponse = Nothing
 
        Try
 
            response = request.GetResponse()
 
            Using responseStream As IO.Stream = response.GetResponseStream()
 
                Using responseReader As New IO.StreamReader(responseStream)
 
                    Dim responseText = responseReader.ReadToEnd()
                    Diagnostics.Debug.Write(responseText)
                    rtn.success = True
                    rtn.reason = responseText
                End Using
 
            End Using
 
        Catch exception As Net.WebException
 
            response = exception.Response
 
            If (response IsNot Nothing) Then
 
                Using reader As New IO.StreamReader(response.GetResponseStream())
 
                    Dim responseText = reader.ReadToEnd()
                    Diagnostics.Debug.Write(responseText)
                    rtn.success = False
                    rtn.reason = responseText
                End Using
 
                response.Close()
 
            End If
 
        Finally
 
            request = Nothing
 
        End Try
 
        rtn.log = f.concat
 
        Return rtn
    End Function



Re: Example signup form?

ajomccauley@...
 

Thank you!  I actually have a premium subscription, so I can use direct add, yay!

So, I'm a web developer, I know PHP, MySQL, some Python, and some JavaScript, BUT, I haven't used REST, and I'm just, lost about where to start.  In particular, I don't understand how I would authenticate with the API, so that it lets me perform actions.

Any chance you have an example you wouldn't mind sharing, to help me get off the ground...?

Thanks so much!
-Alison


Re: Example signup form?

sierragamers@...
 

One tip for anyone experimenting with the API...

Download the free Windows utility called "Postman". I tested every api call in Postman prior to writing code. It saved me a ton of time.

PS I have no affiliation with whoever makes the utility other than having enjoyed using it.


Re: Example signup form?

sierragamers@...
 

There are a couple of subtle nuances to this....

Registering a user is easy (two api calls, login and registeruser). However, that only adds the user and doesn't subscribe them to your group. They can't be subscribed (added to your group) until they confirm their email address. Thus, adding them as a user is somewhat useless. 

There is a "directadd" api call that is great, but requires a paid premium subscription. I experimented with it yesterday and found it worked great. It adds the user to the group immediately (although they still have to create an account the first time they sign in)

In your case, what may make the most sense is to simply have them use an online form to sign up, from which you trigger a invitation to be sent (the invite endpoint). The invitation will give the user everything they need to create a password and join the group.

-Ken W


Re: BREAKING CHANGES #important

ajomccauley@...
 

Hi and thank you!  Did the change happen at the end of September?  I'm new to groups.io and the API, poking around, and when I ran the login object, it included a token field with a super long string in it -- but I see the cookie authentication info in the documentation, so, just wanted to check.  Thanks!


Example signup form?

ajomccauley@...
 

Hi! Can I use the API to create a custom member signup form?  I've looked in the docs, but I'm not sure if I'm not understanding how, or if I'm "not understanding" because it isn't possible to do.

Does anyone have an example of a custom signup form using the API (like that I could put on our organization website) they'd be willing to share or explain or both?

Thanks so much!


Re: Help! I'm confused on how to migrate via the api

sierragamers@...
 

You wouldn't happen to have an example of mbox format would you? 

I've found a few articles, like this one:

https://www.jagwaresoftware.com/blog/what-is-a-mbox-file.html

But they don't seem to address what to do for replies to a message. Let's say I have an original posting and 10 replies... 

Do I just assume that if the subject line is the same the groups.io import will see anything after the first one as a reply?

I'll keep googling...

-Ken W


Re: Help! I'm confused on how to migrate via the api

Gilbert Coville
 

That does sound like the best bet. The yahoo group transfers that have been occurring are all imported very nicely, so I imagine that a user list and mail corpus in mbox format will import very nicely as well.

Gilbert

On Nov 22, 2019, at 3:22 PM, sierragamers via Groups.Io <sierragamers=kensblog.com@groups.io> wrote:

Gilbert -- a frustrating day.

I could not find a way to post a message with a date. And .. then I couldn't find a way to post a message and know the message id I posted .. The getdraft call is supposed to return a draft object with a message_id in it, but it always returns zero.

You probably saw Mark Fletcher's comment that the API can't do what I wanted it to do. Darn! I thought I could work around it by just posting all the old messages under the single user name "Imported message from old board" .. but ..even that isn't working.

Mark suggested converting to a format he could import. I'll investigate that route tomorrow...

-Ken W