An API to fetch profiles of facebook users using their PSID and associating messenger labels to them.
- A facebook page (for utilizing messenger)
- A facebook app (to implement pepper API)
- A webhook setup (to get users PSIDs)
You may refer this guide to complete prerequisite.
Now get the pepper
git clone https://github.com/geekyshacklebolt/pepper.git
conda create -n pepper python==3.7.3 pip
conda activate pepper
pip install -r requirements/development.txt
NOTE: You are free to use any suitable tool for python virtual environment.
Configure a bit
Please have a look at .env.sample, copy its content to
.env file in the project root.
Set it up
python manage.py migrate
python manage.py check
python manage.py run
NOTE: You'll need to create a superuser to access API endpoints.
Creating a superuser is just one command
python manage.py createsuperuser --username example_name --email example_email
Please explore endpoints.md to understand valid endpoints with their corresponding requests and responses.
Once you create the page on facebook and get its
page_id, then go to the endpoint
/api/pagein pepper and feed your facebook page credentials.
Then create a messenger label by using the endpoint
Now, send the list of PSIDs and a label identifier (which you want to associate with them) using the endpoint
An older version of the same API is available in branch csv of this project that accepts PSID list from a