Is it possible to find a list of Yammer users in the 'pending' state using the API?
(we have a growing list of old invites that need to be purged regularly)
Tried a number of options:
The find all users endpoint, paging to 50 per page seems to only return 'active' users (scanned 100+ pages).
https://www.yammer.com/api/v1/users.json
The find by email endpoint returns all user states, although requires knowing the email.
The export users API endpoint produces a .zip file
Pending users were recently added as mentionable:
https://about.yammer.com/yammer-blog/mentioning-pending-users-designing-building-testing-features-yammer Should this recent change have also made pending users visible via the users.json endpoint ?
I know pending users can be identified in the manual user.csv extract by having no join date, no deletion and no suspended date, although how can they be identified via the API? users.json seems to not provide this functionality.
Has anyone been able to automate the deletion of pending users in Yammer via the API?
You can use the Data Export API. Extract the users.csv from the ZIP file using code and then filter for pending users. Pending users do not have a joined_at, suspended_at, or deleted_at date.
NOTE: If you are intended to "remove" a pending user, you must always check if that email address also has an active user associated. An email address can show up multiple times in users.csv. When you do remove a user always suspend the user because it can be undone.
Here's an endpoint you can run a GET on an return the JSON output of the pending user list:
https://www.yammer.com/<your Yammer network>/contacts/network
Example:
https://www.yammer.com/contoso.com/contacts/network
Note: this is an undocumented endpoint so the functionality could change at any time.
Related
Using Google Calendar API v3 to get the calendar list.
However, some users are not able to retrieve their own owner's calendar.
I tried using the Try this API for CalendarList#list to retrieve it,
but it did not return the owner's calendar.
https://developers.google.com/calendar/v3/reference/calendarList/list
However, if the user specifies calendarId as primary in CalendarList#get,
it can be retrieved successfully.
https://developers.google.com/calendar/v3/reference/calendarList/get
Do you have any advice for me?
Can't get a list owned by me in Google Calendar API
Answer: There is no endpoint which will return a full list of all calendars Owned or that the user simply has access to. As this endpoint does not exist the answer to your question is you cant so its working as intended.
In actually you have misunderstood what the calendarlist is. See below
What is calendarList and how does it work?
The calendarList.List is mealy the list that appears on the bottom left hand side of the UI window. There is no guarantee that a user will have anything in this list as it depends upon how the user added the calendar to the list in the first place. The user could also have deleted it form the list. The UI tends to do it automatically but if it was added programmaticlly it will probably not appear it the users calendarlist. So you should not be relying upon the calendarlist to contain a list of all the calendars a user has access to. please see Events and calendars
All users do however have a primary calendar you can always do calender.get on primary and you will get back the primary calendar for that user.
I'm using Gmail.Users.Settings.updateVacation to update our customer service rep's vacation responses automatically over the weekend and after-hours, so our customers who e-mail when we're not in the office get an informative message of when they can expect a response.
I am attempting to do the same thing with our Google Groups, but have not been able to find the correct API call. If I use the same method as above, but with a group's e-mail address, I get a "Delegation denied" error (even though I'm an Owner of the group). I suspect this is because a Group is not a User, and is just different.
I've found the Manage Group Settings API, which essentially has just one update method, and you use properties to specify what you want to update on the group. The problem is, there is no auto-reply property name that I can find.
How do I update a Group's auto-reply settings?
Many thanks!
Unfortunately, what you want cannot be achieved through the API.
All the possible methods are present in the Groups Settings API so if you didn't find the expected method there, then it means that is not possible through the API.
What you can do instead is to file a Feature Request here and provide all the necessary details.
Reference
Groups Settings API - Groups Resource.
I want to create something in Slack that sends a message (starting by calling someone with '#') to a channel when specific users login. I've checked ifttt and zapier. I also checked the slack api to create something myself, but I couldn't really find anything usefull.
Anyone has any ideas?
Slack does not track user login or logoff in a traditional sense. Instead, users are always always "logged in" and available to receive messages once they have joined a team / channel.
There also is the concept of "presence", which is related, but not the same thing. User presence can change multiple times during a few minutes, e.g. if the user is on a mobile. I am guessing you would not want to send the user your message that often.
Still you can poll the presence information of a user with the API users.getPresence , which could be used to implement a script that polls this information on a regular basis and send your message. You also want to filter out presence changes below a certain duration threshold.
Keep in mind though that the rate limit for API methods is 1 per second. So depending on how many users you have in your workspace there will be a significant delay between the user becoming "present" and your script being able to send the message.
There is a workaround for that to have a google sheet as a database for the users and you can trigger by day once and timestamp it.
So the best trigger is a private message or public and you can use filter when mentioning or signin or signout it depends on the trigger word then you pass the filter since zapier won't count your zaps if you used fiter as a second step.
In MailChimp API 2.0 there was a single command, helper/lists-for-email, that would return all of my lists that a particular email address was subscribed to.
https://apidocs.mailchimp.com/api/2.0/helper/lists-for-email.php
I'm having trouble finding anything similar in MailChimp API 3.0.
http://developer.mailchimp.com/documentation/mailchimp/reference/overview/
We have our own page on our website for managing newsletter preferences, and we need to be able to have some of our list options pre-checked when a logged-in user looks at the list, based on which lists he is subscribed to. All I have been able to figure to do is to check the API for each list individually (10 different API calls) to see if a specific email address is subscribed, but this takes a very long time and I am concerned it may time out for some users depending on network traffic. Either way, it's so long that it's an awful user experience.
Is there one API 3.0 call I can make to find out which of my lists a user is subscribed to, like there was in 2.0?
There is now a solution using the following API:
http://developer.mailchimp.com/documentation/mailchimp/reference/lists/#read-get_lists
You can include the "email" field to filter by a user's email.
Here's what I'd like to do:
User completes sign up form on my app
My app sends the input data (email address, name, etc) to Mailchimp via the API, but with a status of 'pending'
My app sends an email to the user asking them to confirm their email address (essentially emulating the Mailchimp confirmation email)
User clicks link in confirmation email, which takes them back to a confirmation page in my app
My app updates the user's status in Mailchimp to 'subscribed' via the API
Essentially, I want to emulate Mailchimps standard confirmation process, but sending the emails from my own app.
The part that I don't know how to do (or don't know if it's possible) is the part where I add a new subscriber with a status of 'pending'.
Here's some further info that's not strictly relevant but may be of interest...
Why don't I just use the standard Mailchimp confirmation email?
The confirmation email needs to contain extra info, unique to each user, that Mailchimp will not have access to.
Why don't I collect all the data locally and then send it all to Mailchimp once the user has confirmed their email address?
For reasons I won't go into, the number and type of required fields will be unknown. At the point when the sign up form is displayed, I will request the list of fields from Mailchimp and display the necessary fields. It is possible that, between the time when the user initially completes the form and the time when the user confirms via email, the required fields will have been changed. If I try to submit the previously collected data to Mailchimp after the required fields have been changed, it will cause an error.
So I need to collect and submit all data to Mailchimp at the same time. And then simply 'switch on' that user in Mailchimp once (s)he has confirmed.
I hope I've provided enough info. If not, happy to provide more or clarify any points.
Thanks!
The internal "pending" status is not able to be managed manually like that. You can subscribe them using double opt-in and then later force them onto the "subscribed" list, but you can't stop them from getting MailChimp's own confirmation email.
One possible work-around would be to add an interest group or merge field that is populated by your system once you've confirmed the email address. You'd then create a saved segment for only confirmed users and make sure you only ever send to that segment and never the whole list.
Another possibility, if you use API v3.0 (which is currently only in beta), is to add them to your list as unsubscribed and then switch their status to "subscribed" once you've confirmed them. If you do this, be very careful that you're not re-subscribing users who unsubscribed or you could wind up in trouble.
This workflow is definitely 100% possible in the current (V3) of the API. Just set the "status" field on a member to "pending" and then to "subscribed".