Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexellis/monzo-get-token
Golang example project for requesting / retrieving a Monzo API token
https://github.com/alexellis/monzo-get-token
api bank monzo oauth2
Last synced: 10 days ago
JSON representation
Golang example project for requesting / retrieving a Monzo API token
- Host: GitHub
- URL: https://github.com/alexellis/monzo-get-token
- Owner: alexellis
- License: mit
- Created: 2018-10-21T07:45:50.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-21T07:48:07.000Z (about 6 years ago)
- Last Synced: 2024-10-12T18:52:18.333Z (25 days ago)
- Topics: api, bank, monzo, oauth2
- Language: Go
- Size: 2.93 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## monzo-get-token
Golang example project for requesting / retrieving a Monzo API token
This code uses the OAuth 2.0 code grant.
## Pre-reqs:
* Create an App on [Monzo developer portal](https://docs.monzo.com/)
* Install Golang 1.10 or newer
* Clone this GitHub repo
## 1. Build the code and insert your tokens
```
export client_id=""
export client_secret=""export redirect_uri="http://localhost:8088/oauth2/callback"
export port=8088go build && ./monzo-get-token
```## 2. Start the OAuth 2.0 flow
Navigate to http://localhost:8088
## 3. Authorize the app and retrieve the token
The token will be displayed in the console log and in your browser.
You can now use it to access the [Monzo API](https://docs.monzo.com/).
## 4. Operationalize
Now you have the token, pay attention to the `expires_in` value - you'll need to use the `refresh_token` to renew your access token when it expires.
License: MIT
Copyright Alex Ellis 2018