Skip to content

Commit f26b439

Browse files
Jiankai ZhengJiankai Zheng
authored andcommitted
docs(readme): change code examples to match new changes
1 parent b4e87ff commit f26b439

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Use the following guides provided by Spotify to use this library:
1313
The Client Credentials flow is used in server-to-server authentication. Only endpoints that do not access user information can be accessed.
1414
```java
1515
ClientCredentialsFlow clientCredentialsFlow = new ClientCredentialsFlow();
16-
String accessToken = clientCredentialsFlow.getAccessToken(
16+
String accessToken = clientCredentialsFlow.getClientCredentialToken(
1717
"CLIENT ID",
1818
"CLIENT SECRET")
1919
.getAccessToken();
@@ -51,7 +51,7 @@ For the second step the following values need to be provided:
5151
```java
5252
AuthorizationRequestToken authorizationRequestToken = new AuthorizationRequestToken();
5353
AuthorizationCodeFlowTokenResponse token = authorizationRequestToken
54-
.getAccessAndRefreshToken(
54+
.getAuthorizationCodeToken(
5555
"CLIENT ID",
5656
"CLIENT SECRET",
5757
"AUTHORIZATION CODE",
@@ -89,8 +89,8 @@ For the second step the following values need to be provided:
8989
- Code verifier (the one that was generated at the first step)
9090

9191
```java
92-
AuthorizationPKCERequestToken a = new AuthorizationPKCERequestToken();
93-
final String accessToken = a.getAccessAndRefreshToken(
92+
AuthorizationPKCERequestToken auth = new AuthorizationPKCERequestToken();
93+
final String accessToken = auth.getAuthorizationCodeToken(
9494
"CLIENT ID",
9595
"CODE",
9696
"REDIRECT URI",

0 commit comments

Comments
 (0)