Skip to content

Latest commit

 

History

History
43 lines (35 loc) · 2.27 KB

README.md

File metadata and controls

43 lines (35 loc) · 2.27 KB

Scrappy Twitter API

Scrappy Twitter API is a Go-backend project that is secured by the Magic SDK for Go.

Scrappy Twitter API (SERVER)

This Go server is where all of the Scrappy Twitter API requests are handled. Once the user has generated a Decentralised ID Token (DIDT) from the client side, they can pass it into their Request Header as a Bearer token to hit protected endpoints.

API Routes

Noteworthy Dependencies

Quickstart

Magic Setup

  1. Sign up for an account on Magic.
  2. Create an app.
  3. Copy your app's Live Secret Key (you'll need it soon).

Server Setup

  1. git clone https://github.com/seemcat/scrappy-twitter-api-server.git
  2. cd scrappy-twitter-api-server
  3. mv .env.example .env
  4. Paste the Live Secret Key you just copied as the value for MAGIC_SECRET_KEY in .env:
    MAGIC_SECRET_KEY=sk_XXXXXXXXXX
    
  5. Run all .go files with go run .

Test with Postman

  1. Import the DEV version of the Scrappy Twitter API Postman Collection: Run in Postman

  2. Generate a DID token on the Client side.

    Click here to spin up your own local client and generate the DID token there.

  3. Pass the DID token as a Bearer token into the Postman Collection’s HTTP Authorization request header and click save.

  4. Send your requests to the Scrappy Twitter API! 🎉