https://spotify-api-prod.herokuapp.com/
This Web API follows the REST principles:
- resources are accessed using standard HTTPS requests
- HTTP requests are made to distinct API endpoints
- use HTTP verbs (GET, POST, PUT, DELETE, etc) based on the action taken
- GET - Retrieves existing resources
- POST - Creates a new resource
- PUT - Updates an existing resource
- DELETE - Deletes resources
- All Data is returned in JSON format
- Requested data is returned as the "data" object
- "data" can be a single item or an array of items, depending on what was requested
- Most responses are accompanied by a "message" object
- Errors return an "error" object
- Auth requests return a "token" object
Required fields:
{
"username": "someone",
"password": "secret",
"email": "[email protected]"
}
Returned JSON:
{
"message": "Success",
"data": {
"id": (numeric)
"username": (string),
"email": (string)
}
"token": (string)
}
Required fields:
{
"username": "someone",
"password": "secret"
}
Returned JSON: sames as /register endpoint above
ALL of the following non-auth requests require an authorization token in the header
- get all of the currently logged-in user's profile information
- update currently logged-in user's profile settings
- delete this user's account
- gets the full list of the user's favorite songs
- add a song to your favorites
- delete user's favorite song with {id}
- Connect current user to a Spotify account
- call GET /api/spotify/connect
- gets a perma access token (refresh_token) from Spotify
- returns jwt with embedded spotify access_token
- Update client's Authorization token with the newly sent one
- Now all calls to the API will include the spotify access token
Spotify Endpoints: