I found
how to do this, but only for api v3.
There is no such functionality for v5?
They are all still available.
Get Channel Subscribers
Check Channel Subscription by User
Check User Subscription by Channel
There's a list of all the major changes on the overview page, so you can just look there to see if any endpoints have been removed.
The new version of the API uses user IDs instead of user names to reference users.
The _links object was removed from all responses. Developers are now responsible for handling the paging offsets when polling the API.
Sub-second precision was added to time fields
The /games/featured endpoint was removed.
delay, background, and banner were removed from the channels response object.
For search endpoints, the q parameter is now called query, and the type parameter is always set to suggest.
The paywalled field was removed from the video response object.
The /kraken/chat endpoint was removed.
For reference, v3 is still available for use until Feb 13, 2018.
Related
Is there any way to get data for a single media obtained with business discovery? Here's my use case:
I use business API to get media from certain users.
I save all the post data, including media ID, images, etc., to build a gallery.
Once in a while, some media URLs expire, and the gallery starts to show broken images, so I need a function that refreshes the posts that have expired images via API in order to get the new media URLs.
To do that, I need to access the single media. I tried with direct media ID
GET /{media-id}
But I got
Unsupported get request. Object with ID '17893828628657031' does not exist, cannot be loaded due to missing permissions, or does not support this operation.
I don't have direct access to media discovered with business discovery API.
Any suggestions?
It seems that I don't have direct access to media discovered with business discovery API.
Yes, that appears to be the case. In the endpoint documentation, in the section titled "Getting Basic Metrics on Media", it explicitly says:
You can use both nested requests and field expansion to get public fields for a Business or Creator Account's media objects. Note that this does not grant you permission to access media objects directly — performing a GET on any returned IG Media will fail due to insufficient permissions.
So I guess you could only make the original business discovery request again - and then update your data storage with the current URLs this returns. If the account added new media since your last request, you might need to paginate through the results, to find your specific older media item IDs in there again.
I have successfully set up a DM bot with the Account Activity API. Everything works very well, except that sometimes the message sent to the bot (through the Twitter's web interface or mobile application) doesn’t fire a webhook to my server. The messages could be quick replies responses or plain text.
The reason is obviously not a downtime of my server since I tried to make a conversation between 2 webhook registered users (so my server receive the webhooks for both users) and for the same message sent, I have successfully received the webhook of the sender (the user) but not for the recipient (the bot).
As the bot isn’t in production yet, the reason is not an overload of messages. There is currently only 2 users that make conversations. From my experience, around 10% of messages are "lost".
I'm using the free (sandbox) Account Activity API tier, but as I understand the only differences between the free and paid versions are a higher number of subscriptions (I'm fine with 15) and the “Retries” feature. Regarding this feature, it is specified that “The Account Activity API provides a retry feature when the client’s web app does not return a ‘success’ 200 response for an account activity webhook event.”
It clearly states that the event failure concerns the client’s side, not the Twitter side. Considering this issue (my server doesn't receive the webhook at all), there is no guarantee that every event will be delivered even if in a paid plan.
This is a big inconvenience for bots since a button can only be clicked once, so the user must retry the conversation from the beginning (besides the fact that the bot "doesn't work"...)
So my questions are :
Is anyone here experience this issue ?
Is this a “bug or a feature” of the free Account Activity API ? I mean, at random the free tier doesn't fire the webhook on purpose (even if it's not specified in the docs) ?
Is there a way to see or measure the webhook failures Twitter side, via the dashboard for instance ?
A guess is that the events could be more accurate if the account is verified (with a blue badge) or hit a followers number threshold ? The treatment could be different due to the potential surge of events, so they are monitored with more ressources, thus more reliable ?
I already create a topic in the official Twitter forum and there is at least one other person in the same case, but no official answer from Twitter so far.
Thanks a lot !
BR,
Simon
I've got an official answer from Twitter :
Unfortunately it is not possible to achieve 100% delivery rate when there is only 1 delivery attempt for an event, which is why we have retries (and even then, retries are not a guarantee either). Things can go wrong; maybe internal issues in Twitter Data Centers, routing issues in the internet, hosting issues at your webhook, etc.
So from the time being, it seems that there's not way to have a 100% success delivery when you build a bot on Twitter.
Full answer can be read here.
On page https://developers.soundcloud.com/
Register a new app (Currently unavailable)
A question for developers. How soon will fix the registration of apps?
Is it possible to register my application in manual mode?
I need my clientId!
Apparently they haven't given out new client IDs for months (another user says so).
To answer your question though, no. As Soundcloud says when you attempt to register an app, "...we will no longer be processing API application requests at this time."
I'm trying to use the API too. It seems like we either need to use client IDs belonging to other people, wait an unspecified period of time, or there may be select uses of their API that don't require a client ID.
It depends on what kind of content you want to access.
If you need only public content than you can obtain the CLIENT ID from your AJAX requests made to soundcloud. Open network debugger in your browser and explore AJAX requests you should see some queries made to api.... and the query string should contain client id:
https://api-v2.soundcloud.com/tracks/687584815/playlists_without_albums?offset=85&limit=5&client_id=xxxxxxxxxxxxxxxxxxxx
Hope that helps.
Since apparently you're not reachable for API questions via email, I guess I'd have to put all the questions in here since it would be tedious to create one for each of them.
So we're planning on creating a webhooks system for our integrations to create a better experience for our users. There are a few pieces that are missing for our end to support having a Podio integration that runs 100% on webhooks.
Support organization level webhooks instead at the space level.
Send full object payload in the webhooks push so we don't need to fetch the resource again. Or at least provide a delta of changes.
Have a secret token header that you send with each request so we can assure the authenticity of the data (that it's actually from Podio and it's not someone trying to hack our system).
Github does a great job with this: https://developer.github.com/webhooks/#delivery-headers.
Ability to unsubscribe from a webhook if the client revokes the OAuth credentials. Do you automatically delete that webhook or do we need to contact the user or you guys to get rid of it?
Trello for instance deletes all webhooks associated with a token if it's revoked or a second option is our server sends a 410 Gone back and the webhook, well you guessed it, it's gone.
Do you think something like this is feasible in the near future?
Thanks for your insights :)
Seems pretty valid point. Are there any particular org operations that you are interested to have webhooks for? Can you also describe some use-cases for org level webhooks?
Sending full object payload is pretty complicated because items in Podio can be extremely big and it might be not needed for webhook to get all details. That's why we keep it small and tiny and let Podio partners build own complicated solutions based on webhooks.
Secret token is not much needed if there is only item_id sent in webhook. Let's review it on item modified scenario.
1) User (or anything else) modifies item
2) item.modified webhook is triggered with item_id
3) 3rd party app receives webhook
4) 3rd party app makes a call to Podio API (if it's needed) and gets all required information from Podio API
So, if webhook request is fake, then Podio API will return same item details and nothing is affected. If you want to have some extra layer of security: why not making webhook URL unique and specific to webhook? Then only Podio will know which URL to use to trigger this webhook.
Ability to unsubscribe from a webhook if the client revokes the OAuth credentials.
Sorry, but I don't understand your question. Can you please re-phrase it as new StackOverflow question?
I have inherited an iOS app that uses Azure Notification hubs to send notifications, however there is a snag.
The users select multiple categories for which to receive notifications (News, Sports, etc), and they can change these at any time. Whenever they add or delete an interest the app unregisters from the notification hub and subscribes with the new tags.
I thought that this was incorrect, but I can't find a way to see what tags a user is subscribed to, or add/delete a single tag.
In the current app, sometimes our test devices don't receive notifications that I think they should.
I've found answers online saying that you should avoid unregistering, and that there is a delay to register and unregister (such as the answer here, Android Azure Notification hub unregister)
I am looking for any insight on how to handle this usecase, of adding and deleting tags.
Since you didn't specify how you are communicating with the Azure Notification Hub, I will use the ANH REST API as reference.
"...I can't find a way to see what tags a user is subscribed to..."
If you request a registration (e.g. per registration ID), you will get the registration data including the assigned tags.
"...or add/delete a single tag."
You don't add or delete single tags directly on the registration in ANH, you basically update the whole registration, if necessary. Some ANH SDKs may have convenience methods for this, but in general, you just send the complete registration object with the desired tags to ANH and it gets overwritten. E.g. the REST API has an "Update Registration" method, but no "Add/Remove Tag" methods.
"I've found answers online saying that you should avoid unregistering, and that there is a delay to register and unregister..."
You should indeed not unregister and register for this use case because of the reasons you stated. This is probably also the reason for:
"In the current app, sometimes our test devices don't receive notifications that I think they should."
Never unregister and register again for updating a registration. Only unregister, if you don't want to receive notifications at all on a specific device.
"I am looking for any insight on how to handle this usecase, of adding and deleting tags."
Basically, just omit the "unregister step" and make the "register step" a "create or update registration step" using the actual ANH registration ID and all desired tags.