Direct Message / Message to User

177 views
Skip to first unread message

tascowe...@gmail.com

unread,
Oct 25, 2016, 4:21:09 AM10/25/16
to GroupMe API Support
Can you send a message to a person that IS NOT a GroupMe user yet?  I noticed in the documentation that Direct Messages require a User_ID for the recipient.  How would I get this User_ID based on only a phone number match?

Martin (GroupMe dev)

unread,
Oct 25, 2016, 5:00:06 AM10/25/16
to GroupMe API Support, tascowe...@gmail.com
Hi,
no, we're not spam-the-world service, you can write only to our users. :) Currently we do not expose API to add user to contactlist.

Regards,
Martin

Dne úterý 25. října 2016 10:21:09 UTC+2 tascowe...@gmail.com napsal(a):

tascowe...@gmail.com

unread,
Nov 2, 2016, 12:44:26 PM11/2/16
to GroupMe API Support, tascowe...@gmail.com
When a user joins a group that I own, does that add them to my contact list?

Example: I create a group with a share URL.  A user joins the group.  I know have their user_id (API) and would like to send them a Direct Message.  That is possible, right?

Here is the json I am sending: 
{"direct_message":{"source_guid":"GUID_97700","recipient_id":"########","text":"Did you get this?"}}

However, I get this error message:
Array ( [meta] => Array ( [code] => 400 [errors] => Array ( [0] => text is required [1] => conversation id is required ) ) ) Array ( [meta] => Array ( [code] => 400 [errors] => Array ( [0] => text is required [1] => conversation id is required ) ) )

Question 1: There is text present. I am not sure why I get the first error message
Question 2: What is a "conversation id"?  This could possibly be the first time a conversation is started based on their  user_id

Martin (GroupMe dev)

unread,
Nov 2, 2016, 1:14:28 PM11/2/16
to GroupMe API Support, tascowe...@gmail.com
Answers are inside the text

Dne středa 2. listopadu 2016 17:44:26 UTC+1 tascowe...@gmail.com napsal(a):
When a user joins a group that I own, does that add them to my contact list?

Example: I create a group with a share URL.  A user joins the group.  I know have their user_id (API) and would like to send them a Direct Message.  That is possible, right?

 - Yes, thats what should happen
 

Here is the json I am sending: 
{"direct_message":{"source_guid":"GUID_97700","recipient_id":"########","text":"Did you get this?"}}

However, I get this error message:
Array ( [meta] => Array ( [code] => 400 [errors] => Array ( [0] => text is required [1] => conversation id is required ) ) ) Array ( [meta] => Array ( [code] => 400 [errors] => Array ( [0] => text is required [1] => conversation id is required ) ) ) 
 
Question 1: There is text present. I am not sure why I get the first error message
Question 2: What is a "conversation id"?  This could possibly be the first time a conversation is started based on their  user_id


 - Seems like you're using wrong API - url to send this to should be  https://api.groupme.com/v3/direct_messages do you use this one?

Regards, Martin 
Reply all
Reply to author
Forward
0 new messages