Getting Id of Twitter account to Validade and give access to URL


#1

Hello Group,

I m looking to know if is possible to get USer Twitter ID to check against my database in order to allow access to the content?

Thanks


#2

You can retrieve the user ID for a given screen name using the users/show endpoint - there’s an example in my recipes gist on Github -> https://gist.github.com/andypiper/32bdb4c7f0b8d65385fc7c8fa3988083#file-basic-user-info-md


#3

In my URL how they pass they ID in onder for me to get

Imagine that in my post is only for few users that must be our clients, I want to validate to check if allow those to access the content in the URL


#4

I imagine you would need to implement a sign-in with Twitter flow on your website, and then use the verify_credentials endpoint to confirm their user ID. How you do all of this is really up to you, I’m just pointing you to the resources that describe how to get the information you’re looking for from the Twitter API.