https://github.com/codecanna/petfinders_tokengen
A simple command line script that generates a Petfinders API token. You have to keep generating them and its annoying to have to keep typing all the cURL stuff all the time.
https://github.com/codecanna/petfinders_tokengen
api application cli generator petfinders token
Last synced: about 1 year ago
JSON representation
A simple command line script that generates a Petfinders API token. You have to keep generating them and its annoying to have to keep typing all the cURL stuff all the time.
- Host: GitHub
- URL: https://github.com/codecanna/petfinders_tokengen
- Owner: CodeCanna
- Created: 2021-10-14T19:56:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-15T13:10:16.000Z (over 4 years ago)
- Last Synced: 2025-02-06T13:51:28.429Z (over 1 year ago)
- Topics: api, application, cli, generator, petfinders, token
- Language: Shell
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Petfinder API token generator
This is a simple script to generate Petfinder API Authorization Tokens. I wrote it to keep my sanity so I didn't have to keep copying and pasting the code to generate a new token.
## Dependencies
* cat
* [jq](https://github.com/stedolan/jq) (JSON Pretty Print)
## How to use
* Run the installer `sudo ./install`
* Try generating a key `gentoken -i [YOUR API KEY] -s [YOUR SECRET]` or try `gentoken -h` to see help
* Done!
You have to request and API key and Secret from Pet Finder. To request a key visit [here](https://www.petfinder.com/developers/) to learn more about requesting an API key. An API key and secret are required for this script to work, and for you to have access to the Perfinder api.
### Example
> ./gentoken -i YOUR API KEY HERE -s YOUR SECRET HERE
And thats it! It doesn't matter what order you pass these in just make sure you pass the correct flag with the correct argument.
You should now see a prettified JSON printout with your token, this output is also written in `/home/$USER/Documents/token.json`.