Hi there,

So I’ve followed the guides.

  1. I made a developer account and I applied yesterday night for Twitter API & Twitter API v2 Early Access

  2. I made an App attached to a project;

  3. I’ve generated keys;

  4. I gave all the permissions to the app.

  5. I attempted calling the two following URLs:
    a. GET https://api.twitter.com/2/tweets/search/recent?max_results=5
    b. GET https://api.twitter.com/2/users/by/username/{username}

    With the header key: Authorization, value: Bearer {token}

    I tried with Postman and with RestSharp

Code with RestSharp:
var restClient = new RestClient(confguration.TwitterBaseEndpointUrl);
restClient.Authenticator = new OAuth2AuthorizationRequestHeaderAuthenticator(this.confguration.TwitterBearerToken, “Bearer”);
var request = new RestRequest($“tweets/search/recent?max_results=5”, Method.GET);
var response = await client.ExecuteAsync(request);

With Postman:

Also, how do I know if my account was properly approved? I haven’t had any wait time after completing the forms?

Can anyone help me?

Thank you very much

1 Like

If you can make apps and generate bearer tokens etc. Then your developer account is approved.

Does a curl command work?

curl --request GET \
  --url 'https://api.twitter.com/2/tweets?ids=1263150595717730305' \
  --header 'Authorization: Bearer AAA...zzz'

(Replacing Aaa..z with your own token)

Thanks Igor, it’s embarrassing, I should have tried it first with curl. >_<

Looks like it’s working, just have to figure out what’s wrong with what I’m doing, hehe

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.