Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heppu/instagram-token-fetcher
Go module and cmd tool to get instagram access token programmatically
https://github.com/heppu/instagram-token-fetcher
go instagram instagram-api
Last synced: about 2 months ago
JSON representation
Go module and cmd tool to get instagram access token programmatically
- Host: GitHub
- URL: https://github.com/heppu/instagram-token-fetcher
- Owner: heppu
- License: mit
- Created: 2017-01-25T11:13:39.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-25T14:06:43.000Z (almost 8 years ago)
- Last Synced: 2024-08-09T00:32:22.743Z (5 months ago)
- Topics: go, instagram, instagram-api
- Language: Go
- Size: 4.88 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Instagram token fetcher
This repository offers module for Go projects to fetch instagram access tokens programmatically.
It also has a command line tool for getting access tokens.## Usage
In code:
```
go get github.com/heppu/instagram-token-fetcher
``````go
package mainimport (
"log""github.com/heppu/instagram-token-fetcher"
"gopkg.in/alecthomas/kingpin.v2"
)func main() {
tokenClient := igtoken.NewClient(
"my-app-id",
"http://some-url.com:8888/token",
"some-user",
"some-passwd",
)token, err := tokenClient.GetToken(igtoken.PUBLIC_CONTENT)
if err != nil {
log.Fatal(err)
return
}
log.Print(token)
}
```From command line
```
go install github.com/heppu/instagram-token-fetcher/cmd/ig-token
ig-token --help
```## How it works
First token client opens http server to listen redirect url and catch the access token. After that it creates http client with cookie jar and logins with user credentials by parsing data from html responses.