Giter VIP home page Giter VIP logo

musicmaster_react's Introduction

Notes

Template

前置作業

go to the another directory

$ cd MusicMaster-React\web-api-auth-examples-master\authorization_code
$ node app.js
  1. 登入Spotify
  2. 從url地方拿到完整的access_token
  3. src/App.jsx,複製給予等等要用的變數
 var accessToken = {{fresh token here}}
  1. 然後
$ npm start

Reference

Problems Solved

Token

Request & Response

GET /v1/artists/43ZHCT0cAZBISjO8DG9PnE/top-tracks?country=TW HTTP/1.1
Host: api.spotify.com
Accept: application/json
Content-Type: application/json
Accept-Encoding: gzip, deflate, compress
Authorization: Bearer BQAz0dWQ4uEGTvzDwHFsqHuo5482JrBoq2lHOsCBYqLpT33iOz7NjujrpdLw9TJzArZWQeVqQl9HEVaWDotz-B3hL17hpngl6vIbK5NpRm7c9iRGPyUp0sr_pXodZW-np9HA9cna4xwWTeANtm7tY3FbfH9kxs7nJaI&refresh_token=AQAspe1TbdA4fBvg3WtBt-cquWvM4MuUJORTBxKe-3ReCrjs9WEraptGuHCvztz2cvNO4gCfUfmwUkdbRc-puaEggeQ672NFbVgo4XCJZFBqSnlNFVcT5ORTjKq4RhEo0xc
User-Agent: Spotify API Console v0.1
HTTP/1.1 401 Unauthorized
Access-Control-Allow-Headers: Accept, Authorization, Origin, Content-Type
Access-Control-Max-Age: 604800
Transfer-Encoding: chunked
Content-Encoding: gzip
Keep-Alive: timeout=600
Server: nginx
Connection: keep-alive
Access-Control-Allow-Credentials: true
Date: Wed, 20 Dec 2017 04:26:54 GMT
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE
Content-Type: application/json
Www-Authenticate: Bearer realm="spotify", error="invalid_token", error_description="The access token expired"

GitHubs

Using it to refresh my own token

musicmaster_react's People

Contributors

jialinhuang00 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.