Skip to content

Commit 6916491

Browse files
authored
docs(readme): fix headings & add guides
1 parent be21724 commit 6916491

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
# Spotify Web API Wrapper
44
Spotify API wrapper for Java
55

6+
## Guides
7+
Use the following guides provided by Spotify to use this library:
8+
- [Authorization Guide](https://developer.spotify.com/documentation/general/guides/authorization-guide/)
9+
- [Web API](https://developer.spotify.com/documentation/web-api/reference/)
10+
611
## Example usages
712
### Client Credentials Flow
813
The Client Credentials flow is used in server-to-server authentication. Only endpoints that do not access user information can be accessed.
@@ -53,7 +58,7 @@ AuthorizationCodeFlowTokenResponse token = authorizationRequestToken
5358
"REDIRECT URI");
5459
```
5560

56-
## Authorization Code Flow with Proof Key for Code Exchange (PKCE)
61+
### Authorization Code Flow with Proof Key for Code Exchange (PKCE)
5762
The authorization code flow with PKCE is the best option for mobile and desktop applications where it is unsafe to store your client secret. It provides your app with an access token that can be refreshed. For further information about this flow, see [IETF RFC-7636](https://tools.ietf.org/html/rfc7636).
5863

5964
The first step to get an access and refresh token through the Authorization PKCE Code Flow is to build an url.
@@ -92,14 +97,14 @@ final String accessToken = a.getAccessAndRefreshToken(
9297
"CODE VERIFIER")
9398
.getAccessToken();
9499
```
95-
## Using access token
100+
### Using access token
96101
The `AuthorizationCodeFlowTokenResponse` contains the access and refresh token. The access and refresh token can be used to access api endpoints.
97102
```java
98103
SpotifyApi spotifyApi = new SpotifyApi("ACCESS TOKEN", "REFRESH TOKEN");
99104
AlbumFull albumFull = spotifyApi.getAlbum("ALBUM ID");
100105
```
101106

102-
## Refreshing access token
107+
### Refreshing access token
103108
When the access token has expired it can be refreshed using `AuthorizationRefreshToken`
104109
```java
105110
AuthorizationCodeFlowTokenResponse token = authorizationRefreshToken

0 commit comments

Comments
 (0)