# Tokens

## Logging in/ signing up

Go to [Twitter](https://twitter.com/) and log in or sign up for an account which you would use for development.

{% hint style="info" %}
&#x20;It is recommended to create a **separate account** for your twitter app,\
Especially for creating a bot
{% endhint %}

## Applying for access

&#x20;Go to [developers.twitter.com](https://developer.twitter.com/en/apply-for-access) and apply<br>

![click apply for a developer account](https://3338510512-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQqFgHwayQVsvzTGEw_%2F-MQzZ4vgv0J_52VZ__90%2F-MQzZqlAuh0fLAS2armS%2Fdownload%20\(1\).png?alt=media\&token=a434ea09-bcb2-437c-87e3-244b671983be)

After applying you will have to wait a few days until Twitter reply back to you if you were accepted or they need more infomation...

{% hint style="warning" %}
The steps from here need to be done after you have developer access
{% endhint %}

### **Creating a  app on Twitter**

Create an APP on [developer.twitter.com](https://developer.twitter.com/en/apps)\
Fill in the required details\ <br>

## Getting your tokens

{% hint style="warning" %}
Now you would have to deside on what auth you want\
\
user - on a user account\
app - on a app\
\
\
user auth requires 4 keys, and this guide only follows user aut\
\
app auth only require bearer\_token
{% endhint %}

Go to keys and tokens and generate an access token and access token secret, these four alphanumeric string thingies are the reason we went through so much trouble of making a developer account and app.\
\
**consumer\_key:’ ’,**\
**consumer\_secret:’ ’,**\
**access\_token:’ ’,**\
**access\_token\_secret:’ ’**\
\
**these are the needed fields for you bot to work!!**\ <br>

Have a nice day coding :)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://seoden2136.gitbook.io/tweet-js/tokens.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
