Telegram: Contact a user by Id [closed] - telegram

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I'd like to contact a user by his id instead of his username
https://t.me/ID_USER like https://t.me/732189738218
is it possible?

yes, you can.
you can call SendMessage method and specify chat_id parameter.
also you can add contact by chat_id. [please see Raw API Docs]
but you can't search/get full user info. public fields only!

No sir unfortunately you can't do that. Telegram Bot API doesn't return phone number. You should either use Telegram API methods instead or ask it explicitly from the user. You cannot get "friends" of a user as well.

Related

Best method of back end pseudo user validation with DynammoDB [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed last month.
Improve this question
I have a simple app that is using a dynammoDB table with node/express as the back end. I let users add and then edit things. I am trying to determine the best way to verify that a user owns the item that they are editing/deleting.
Here is what i've looked at. Is there a better method?
1. User cognito ID is part of the item when created
2. User token is sent as part of edit
3. Item is pulled from table when edit starts
4. Token is decoded and the id is compared to the one pulled from the table
The obvious problem here is that every edit requires a read. This seems wrong.
Another method
1. User cognito ID is part of the item when created
2. User token is sent as part of edit
3. Original id is sent from the item as well
4. Token is decoded and the decoded id is compared to the one sent
This doesn't require a read, but would let a clever person edit things that they shouldn't.
Is there another way that I am missing? I don't want to create some separate IAM policy for each user.
You should use DynamoDBs fine grained access control that can dynamically allow Cognito users only read/edit their own data:
https://aws.amazon.com/blogs/aws/fine-grained-access-control-for-amazon-dynamodb/

Hey everyone, I am trying to dynamically change the a-text value based on the URL parameters [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
https://github.com/rohanshiva/pass/blob/master/index.html
Basically, the user submits a form with name, the form generates a QR code. The qr code will basically contain the link to the ar.html page with url parameters like this - jackdorsey.github.io/ar.html?name=rohan
I am able to successfully get the value using new URLSearchParams(window.location.search), but I don't know how to set the a-text value based on the url parameters. Any help would be awesome. It is fine if its just changing a-text
Create a component and call this.el.setAttribute('value', 'your string')
Working example: https://glitch.com/edit/#!/shore-haumea?path=change-text.js:1:0

What is redirect-url field in linkedin application regiration [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I am new to linkedin app development. i just want to know what i need to give in the redirect-url field.
I am getting an error Invalid redirect URI. Can any one help me out
Thanks in Advance
Generally redirect uri is used for getting server response values...!
(i.e) I'm passing https://www.linkedin.com/uas/oauth2/authorization?response_type=code&redirect_uri=YOUR_REDIRECT_URI
This YOUR_REDIRECT_URI could be anything... mine was example.com/callback And in return from above i can get authorization code
example.com/callaback/?code=AUTHORIZATION_CODE&state=STATE
So finally in your code you can get this authorization code.
For more information please see this link

Session_start and end in ASP.NET [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am building a website. In this website, when a user logged in successfully, how i start session for him and when he hit on log out button ,how i close the session.
Please help me. I am a beginner in Asp.net. So please help me with your answers in Details.
Thank You.
VB.NET
To Create
Session.Add("UserSession", MySession)
To Asign
Dim vUserSession As String = Session.Item("UserSession")
To Close
Session.Item("UserSession") = Nothing
C#
Check this link there is a good explain
http://forums.asp.net/t/1261964.aspx
Depending on how you're setting this up, there are .NET controls that provide this functionality mostly for free (you don't have to write a lot of code to get it to work). Look into the Login control.
You need to decide whether you're authenticating against a domain or a database. Most likely it's a database. Just mask sure you hash the password in the database, and hash the password in the app, and compare the hashes.

How do you set up an API key system for your website? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Let say that I have a website with some information that could be access externally. Those information need to be only change by the respected client. Example: Google Analytic or WordPress API key. How can I create a system that work like that (no matter the programming language)?
A number of smart people are working on a standard, and it's called OAuth. It already has a number of sample implementations, so it's pretty easy to get started.
Simple:
Generate a key for each user
Deny access for each request without this key
Currently, I use a concatenation of multiple MD5s with a salt. The MD5s are generated off of various concatenations of user data.
A good way of generating a key would be to store a GUID (Globally Unique Identifier) on each user record n the database. GUID is going to be unique and almost impossible to guess.
There are also infrastructure services that manage all this for you like http://www.3scale.net (disclosure I work there), http://www.mashery.com and http://www.apigee.com/.

Resources