Website URL in create an app



I am trying to create my first app but I don’t understand what is Website URL and Callback URLs?


if I added my twitter account URL is it true?
also, I set up a dev environment but what is the next step?
I see this post

account_type: premium 
 bearer_token: <TOKEN>

how can i get it is there any example?


Hi @fatiima_mb - did you manage to figure this out?




Hello @fatiima_mb

Website URL is simply the URL for any website that you might own. I don’t believe this is a required field.
You can learn more about Callback URL here:

If you are using the premium Full archive data endpoint, you are going to use the following as your <FULL_URL_OF_ENDPOINT>, making sure to replace dev with the dev environment name that you specified here.

You will also have to replace <TOKEN> with a bearer token that you generate by following the instructions here:

So an example of this might look like this:

account_type: premium 
 bearer_token: AAAAAAVELAEOIA368sd76a9sduvalkje


thank you it is helpful, I created a YAML file but when I run this code I get this error

premium_search_args = load_credentials("C:/Users/DRC/Desktop/.twitter_keys.yaml",
cannot read file C:/Users/DRC/Desktop/.twitter_keys.yaml
Error parsing YAML file; searching for valid environment variables
Account type is not specified and cannot be inferred.
        Please check your credential file, arguments, or environment variables
        for issues. The account type must be 'premium' or 'enterprise'.

KeyError                                  Traceback (most recent call last)
<ipython-input-18-0e82e11b9e9a> in <module>
      1 premium_search_args = load_credentials("C:/Users/DRC/Desktop/.twitter_keys.yaml",
      2                                        yaml_key="search_tweets_fullarchive_dev",
----> 3                                        env_overwrite=False)

~\Anaconda3\lib\site-packages\searchtweets\ in load_credentials(filename, account_type, yaml_key, env_overwrite)
    187                    if env_overwrite
    188                    else merge_dicts(env_vars, yaml_vars))
--> 189     parsed_vars = _parse_credentials(merged_vars, account_type=account_type)
    190     return parsed_vars

~\Anaconda3\lib\site-packages\searchtweets\ in _parse_credentials(search_creds, account_type)
     80         """
     81         logger.error(msg)
---> 82         raise KeyError
     84     try:



The error is reporting that your file cannot actually be read or found. Maybe check your directory structure?


yes I fixed it and it can read it but I got this error
Error parsing YAML file; searching for valid environment variables


This sounds like a file format issue.


here is the YAML file I wrote, is there any mistake?

  account_type: premium
  consumer_key: Sz************************************
  consumer_secret: lP8*********************************************


Looks like it was solved over here: (it was yaml file white space formatting)


yes all that because of white space :sob:
thank you all

closed #14