Slack user id and access token unique across teams or users - slack-api

Are user id's in Slack unique across teams or users? For instance, if User A installs an app for Team A and Team B is that users's id and access token the same between both teams?

As of writing, User IDs are now globally unique.
More info here

Slack user IDs are only unique to the team containing them -- you might encounter re-used IDs when working with other teams, and Slack encourages you to keep this in mind when storing IDs -- you'll want to partition them by team ID.

According to the documentation id is unique only within a team.
https://api.slack.com/types/user
id, String - Identifier for this workspace user. It is unique to the workspace containing the user. Use this field together with team_id as a unique key when storing related data or when specifying the user in API requests. We recommend considering the format of the string to be an opaque value, and not to rely on a particular structure.

Related

Can I get the team id of a user using app store connect api?

Can I get the team_id for a user using app store connect api? I have looked https://developer.apple.com/documentation/appstoreconnectapi/users but don't see anything. I don't necessarily need it for a specific user but the team id related to that particular app.
The App Store Connect ID works via issuer-id and no longer exposes old / legacy identification like team_id or portal_team_id similar to how fastlane uses it via web authentication: https://github.com/fastlane/fastlane/blob/48151291f2c4949c3b1b9919ba2cc81a7cc33293/spaceship/lib/spaceship/portal/spaceship.rb#L42
An ASC API key is only ever valid for one team, therefore in the API logic it should also not have access to that information.

Connection between Users and People in Microsoft Graph API

Using the Microsoft Graph API I'm fetching a list of users using the following endpoint:
https://graph.microsoft.com/v1.0/users
After that, I want to check if a user is an actual person. For that, I'm planning to use People endpoint.
However, I can't find a method that will return all people in the organization. Users can also represent a room or a group and I want to be able to differentiate them. The only options that I could see are:
https://graph.microsoft.com/v1.0/me/people
https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}/people
But they only return people that are related to a user with the provided id.
Is there a solution for getting a corresponding Person object for every User in the organization?
The /people endpoint can only return a person object if there is a connection between the person and the user.
Consider what a person represents:
An aggregation of information about a person from across mail, contacts, and social networks. People can be local contacts, contacts from social networking or your organization's directory, and people from recent communications (such as email and Skype).
If the user and the person are not connected in some way, there aren't enough sources to aggregate for a response. More importantly, the sources for someone#someplace.com will be different between two user records (i.e. I'm connected with them on Skype and LinkedIn, you've only emailed them once a while back).
Also note that to pull a single person, you need to provide that person's id:
`/me/people/{id}`

Facebook ID or Cognito ID or Alternative for my iPhone application

I am currently uniquely identifying a user by storing the FacebookID of that user. I recently read around and I saw that this is incorrect usage and that Facebook ID's can change for some reason, all in all that I shouldn't use them. Is this true? If so, is a AWS Cognito ID that is derived when a new facebook user signs in and authenticates themselves a viable way to uniquely identify a user? If not, How would I uniquely link a facebook account, with apparently no variable that is stable enough to store, with a unique identifier to store in my database?
Check the following statement (from the official documentation: https://developers.facebook.com/docs/apps/upgrading):
No matter what version they originally used to sign up for your app, the ID will remain the same for people who have already logged into your app. This change is backwards-compatible for anyone who has logged into your app at any point in the past.
So, you can use the Facebook ID to uniquely identify your users.
However, depending on your use case and the way you plan to manage security, you should consider a few more things. The purpose of AWS Cognito ID is not to be communicated between users, it is kept between your app and Cognito. So if you want users to communicate using their accounts (sending text messages for example), the Facebook ID is more suited for that. Nevertheless, I am experiencing this problem when trying to achieve fine-grained access control using DynamoDB.
As Hatim said, the Cognito identity id is not meant to be shared between users.
That being said, once an identity id has a login associated to it, it could only change on merging with another authenticated id. Unless you're doing that, which it doesn't sound like you are, it would be a stable way to identify your users. You could use the identity id as the identifier in your database, as long as it isn't exposed.
If you're using DynamoDB, as this blog post explains, doing it this way allows you to configure your IAM roles to make access to this data more secure.

Nest API - How to uniquely identify an account

I'm integrating with the Nest API and I'd like to know to whom an access_token belongs. I don't need an email or name or anything identifying the account holder, I just need a unique account identifier.
Is there something like https://developer-api.nest.com/account.json or user.json?
Documentation: API Reference
There isn't something account specific, but both structures and devices can only belong to one account, so you could use the structure_id as the unique identifier. It is unlikely that a user would delete their primary structure (kind of hard to to) and you can guarantee that any two users don't have the same structure.
You might notice this ID is different for each developer account, this is to protect the user's privacy. (e.g. developers can't serve ads based on unique identifiers)

What is the CID parameter in Google shopping URL?

I noticed the existance of "cid" parameter in every product page I examined in Google Shopping website?
Can we depend on this parameter to uniquely identify each product? Is it possible that Google will use the same parameter value for another product in the future?
Yes, cid is used to uniquely identify a product.
The CID stands for the Customer ID, this is an ID unique to the visitor and should not be used for the product. The CID is a universally unique identifier (UUID) and is a 128-bit number used to identify information in computer systems. This value is stored in the _utma Google Analytic Cookie to track the device it is assigned to. Additional reference: https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cid

Resources