Getting information about many users using Spotify's API - api

I've looked briefly through Spotify's API documentation to try and see what exactly can be done with the API. I'm trying to do some data analysis on Spotify data, specifically on user listens / user playlists. However, as far as I can tell, the only way to uncover that information is through OAuth, and each user whose play information I desire would need to explicitly grant permission to my app to use their information. Since I am not building a user-facing app and am interested in doing mass analysis on many users at once, I don't think this would work for my purposes.
My question - is there any way to return multiple users' listening habits through a script that pulls data from Spotify using its API? Or is that possible strictly by way of an application that one user at a time gives authentication to when they load an app that uses this API?

is there any way to return multiple users' listening habits through a script that pulls data from Spotify using its API?
Spotify doesn't expose users' listening habits unless they authorized the app requesting it (I think this is what you meant when you said "through OAuth"). There's pretty big privacy reasons for not exposing users' data to the world.

Related

How to integrate Google business messaging through API

Problems:
I am unable to enable Business Messages API, Because "Business Messages API" is not showing API list, While i am going to enable the API through the
https://console.cloud.google.com/apis/dashboard
I want to use auth token, while hitting the API, but the document is saying use the service.json for the credentials. i am following these doc. I am using "Google\Client()" with Laravel application.
https://developers.google.com/business-communications/business-messages/guides/how-to/agents?method=api
I am following these steps:
Login with google business account in the Dashboard
App taking multiple permissions as I have attached the permissions list and taking the auth token.
Open the chat box for the Business.
So please guide me, where i am going wrong. What is correct way to implement this.
Requirement:
I want to create a custom chat box for google businesses, Where business owner will login into the web app and He can easily manage the multiple business chats in one dashboard.
As per your given information, you have to be a partner of Google. As per google documentation, you need to be a partner of google and then you can create the agent and can send and receive messages. You can integrate the business messages API by following this documentation:
https://developers.google.com/business-communications/business-messages/guides
In this process, you need to be a partner of Google. The complete process is given on the link. If you follow this link, then you can use their built-in libraries easily and can send messages easily.
So far the permission for API, it might not be found for you because you might have to take permission for the particular project that is registered on google and then you will see the business messages API and you can enable it and use it. The reason as per the basic step:
https://developers.google.com/my-business/content/basic-setup
Sometimes, you have to submit the request form to take the API access for particular APIs. Or Share how are you using that API.
If you do not find a form for business messages API then you can ask for the information from bm-support#google.com. they mostly respond on a working day.

Long living Shopify token

We are working on a system which retrieves data from customers' Shopify shops and provides some services based on this data. In order to make it as convenient as possible for an end-user we would like to update this data on a daily\weekly\monthly basis.
For now we only came up with a solution of implementing unlisted app, prompt a user to provide all necessary permissions for the app to access their shops and fetch the data. But the token we get doesn't seem to be valid for a long time and we probably won't be able to reuse it a day later.
We appreciate it if you can share any success cases of implementing this kind of approach.
You provide an App to the merchant they can install using oAuth. When the merchant is prompted to approve the App, Shopify will then provide your App with a long-lived access token you can use as much as you want, for as long as you want. I use a custom App from my Partner App dashboard to create these kinds of one-off Apps. It is superior to the one where the merchant has to tick off scopes and permissions IMO.
There are two kinds of token you can ask for and receive. One is considered for offline access, or long-lived. It works for everything. It is for webhooks as an example, or other access where no person is involved. But, there is also, online access tokens! Say a person clicks into the App from Shopify to do some work. You can request an online token for them to do their thing, and that token is only good for say 24 hours.
So you have options!

API to check Periscope User is Online

I've scoured for any information regarding an Open API for Periscope.
I have a twitter feed, that should only show if Periscope is Live (the said user will share the broadcast via Twitter).
I can parse the word "IS LIVE" but then I'd have to parse multiple languages.
I'm looking to check an API if the user is Online in periscope, if so, then display the latest twitter feed (which is the broadcast).
There was this User Online button that could be generated
https://www.periscope.tv/embed
it calls an api like https://embed.periscope.tv/user/bpsdmik.json
but it seems that the certificate is invalid, so I keep getting errors ..
Any help / workarounds would be much appreciated!
I've Searched OPEN Periscope, but mostly requires an Authentication token etc.
There is no open API for Periscope. At least, not that I'm aware of. Which would explain your difficulty in finding anything. The closest thing would be the Unofficial Periscope API, documented by Pmmlabs (the same folks who run the OpenPeriscope project). However, as you've already discovered, most of the calls to the Periscope API, including all user-related calls, require an auth token.
Outside of using the API or screen scraping, the only other way I can think of to tell if a user is live or not is to try accessing their Periscope page directly. When you go to a user's Periscope page at https://www.pscp.tv/{userId}, Periscope will redirect you to that users most recent broadcast, where you can parse the broadcast id from the redirect URL. Once you have the broadcast id of the most recent broadcast, you can use the following API call (which does not require an auth token):
https://api.periscope.tv/api/v2/getAccessPublic?token={broadcastId}
... to determine whether the broadcast is live or not. Look at the JSON response and if the "type" field equals "StreamTypeReplay", then it's a replay, otherwise it's a live broadcast.

Using foursquare authentication

So I'm making an app where I use foursquare API to get closest venues. I'm also thinking about using the features that require the user to authenticate, like check in endpoint. But as I have explored the foursquare authentication, it seems like that my users would have to create foursquare account to use my app.
My problem with this is that it feels like I'm giving too big part of my app (all the user details) to foursquare's side. Like if I want to create features in my app that don't require foursquare account, isn't the linkage to foursquare's stuff restricting my ability to grow my app (as my users are basically all foursquare's users.)
So is there a way to create my own user database while using the foursquare's features? Or is this even a thing to take into account? Will it cause me problems in the future?
The checkin endpoint requires user authentication because a user is checking into a venue. This is key feature of foursquare. The user has to be a foursquare user because there'd be no other way for foursquare to track them and stats, and comments, etc.
I think what you want to do is create your own app that allows someone to do things similar to Swarm or some of the venue features in Foursquare. You need to create your own database of user information and track everything yourself. If a person wants to use any of foursquare features they need to be a foursquare user. Anything your app keeps track of wont be a part of the foursquare network. One could not checkin with your app and have it show up in foursquare, if you keep things separate.
If you decide to mix and match just remember there are time limits on data caching that foursquare would like you to adhere to.
As for future problems, read the Terms Of Service for the API carefully, and if your app seems like a clone of either Swarm or FourSquare, and you're not using their users, they might ask you to cease and desist

Is it possible to identify the person talking to the google assistant by voice?

Recently google has added multiple user support to the assistant so how would use the API to identify the person by voice?
It depends what you mean by "identify the person".
There is no way for an Action to get the raw audio, so there is no way for it to do voice printing or anything along those lines.
Although each voice has to be reported against a Google User ID, you do not have direct access to that user ID.
What developers do have access to is a UID that is sent along with each request to your fulfillment server. This UID is consistent across requests, although it can be reset by a user (for example, if they reset their Google Home). You can think of this the same way you think of an HTTP cookie - you can track the UID and, if you see it again, have reasonable assurance it is the same user that accessed it last time. This breaks down, however, for the "default" account on Google Home, since anybody who doesn't have an account will map to this user.
Beyond this, you can also use Account Linking to connect a Google Account consistently to an account in your own system. If you have sufficient authentication in place, or are using one from Google or Facebook for example, this can act as an identity.
There isn't an API for developers to identify users by voice.