Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/freerange/freeagent-scripts
Command-line scripts to be run against v2 of the FreeAgent API
https://github.com/freerange/freeagent-scripts
Last synced: 4 days ago
JSON representation
Command-line scripts to be run against v2 of the FreeAgent API
- Host: GitHub
- URL: https://github.com/freerange/freeagent-scripts
- Owner: freerange
- Created: 2016-12-14T15:35:13.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2023-03-16T07:09:05.000Z (over 1 year ago)
- Last Synced: 2024-10-29T13:17:41.270Z (15 days ago)
- Language: Ruby
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## FreeAgent Scripts
Ruby scripts for querying/modifying the data in a FreeAgent account.
### Configuration
* Scripts in this project are intended to be run on your local machine.
* So you need to create a `.env` file in the project root directory:```
CLIENT_ID=
CLIENT_SECRET=
```* You should be able to set these environment variables using the values stored in the secure note named "FreeAgent API - Go Free Range app" in the shared 1Password vault.
* These values refer to the "Go Free Range" app (visit "App URL" in the secure note for more details).
* The first time you run one of the scripts, it will ask you to sign in to FreeAgent in a browser and authorize the application.
* The details of the access token thus obtained are saved to a file, `access-token.json`.
* The access token is usually valid for 1 hour. If you run one of the scripts within this time, you won't need to sign in again.
* Also the access token has a refresh token which is valid for a longer period. If the access token has expired it will automatically be refreshed, so you still won't need to sign in.
* If the refresh token has expired, you'll need to delete the `access-token.json` file, run the script again and sign in again.
* You can see the apps authorized by the currently logged in user via the FreeAgent settings: https://freerange.freeagent.com/settings/authorized_apps.