You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ae55ddb
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: SpotifyAPI.Docs/docs/authorization_code.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ title: Authorization Code
10
10
If you are already in control of a Web-Server (like `ASP.NET`), you can start the flow by generating a login uri:
11
11
12
12
```csharp
13
-
// Make sure "http://localhost:5000" is in your applications redirect URIs!
13
+
// Make sure "http://localhost:5543" is in your applications redirect URIs!
14
14
varloginRequest=newLoginRequest(
15
-
newUri("http://localhost:5000"),
15
+
newUri("http://localhost:5543"),
16
16
"ClientId",
17
17
LoginRequest.ResponseType.Code
18
18
)
@@ -23,14 +23,14 @@ var uri = loginRequest.ToUri();
23
23
// Redirect user to uri via your favorite web-server
24
24
```
25
25
26
-
When the user is redirected to the generated uri, they will have to login with their Spotify account and confirm that your application wants to access their user data. Once confirmed, they will be redirected to `http://localhost:5000` and a `code` parameter is attached to the query. This `code` has to be exchanged for an `access_token` and `refresh_token`:
26
+
When the user is redirected to the generated uri, they will have to login with their Spotify account and confirm that your application wants to access their user data. Once confirmed, they will be redirected to `http://localhost:5543` and a `code` parameter is attached to the query. This `code` has to be exchanged for an `access_token` and `refresh_token`:
27
27
28
28
```csharp
29
-
// This method should be called from your web-server when the user visits "http://localhost:5000"
29
+
// This method should be called from your web-server when the user visits "http://localhost:5543"
Copy file name to clipboardExpand all lines: SpotifyAPI.Docs/docs/example_asp.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ This example is based on ASP .NET Core. It uses `Authorization Code` under the h
17
17
18
18
## Run it
19
19
20
-
Before running it, make sure you created an app in your [spotify dashboard](https://developer.spotify.com/dashboard/) and `https://localhost:5001` is a redirect uri of it.
20
+
Before running it, make sure you created an app in your [spotify dashboard](https://developer.spotify.com/dashboard/) and `https://localhost:5543` is a redirect uri of it.
21
21
22
22
```bash
23
23
# Assumes linux and current working directory is the cloned repository
@@ -26,5 +26,5 @@ dotnet restore
26
26
27
27
SPOTIFY_CLIENT_ID=YourClientId SPOTIFY_CLIENT_SECRET=YourClientSecret dotnet run
Copy file name to clipboardExpand all lines: SpotifyAPI.Docs/docs/example_blazor.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Very similar to the [Blazor WASM Example](example_blazor_wasm.md), but runs code
13
13
14
14
## Run it
15
15
16
-
Before running it, make sure you created an app in your [spotify dashboard](https://developer.spotify.com/dashboard/) and `https://localhost:5001` is a redirect uri of it.
16
+
Before running it, make sure you created an app in your [spotify dashboard](https://developer.spotify.com/dashboard/) and `https://localhost:5543` is a redirect uri of it.
17
17
18
18
```bash
19
19
# Assumes linux and current working directory is the cloned repository
@@ -22,5 +22,5 @@ dotnet restore
22
22
23
23
SPOTIFY_CLIENT_ID=YourClientId SPOTIFY_CLIENT_SECRET=YourClientSecret dotnet run
Copy file name to clipboardExpand all lines: SpotifyAPI.Docs/docs/example_blazor_wasm.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Since this library is compatible with `.NET Standard 2.1`, you can use all featu
16
16
17
17
## Run it
18
18
19
-
Before running it, make sure you created an app in your [spotify dashboard](https://developer.spotify.com/dashboard/) and `https://localhost:5001` is a redirect uri of it.
19
+
Before running it, make sure you created an app in your [spotify dashboard](https://developer.spotify.com/dashboard/) and `https://localhost:5543` is a redirect uri of it.
20
20
21
21
```bash
22
22
# Assumes linux and current working directory is the cloned repository
Copy file name to clipboardExpand all lines: SpotifyAPI.Docs/docs/example_cli_custom_html.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ An example to show how you can display your own HTML resource after the user wen
13
13
14
14
## Run it
15
15
16
-
Before running it, make sure you created an app in your [spotify dashboard](https://developer.spotify.com/dashboard/) and `https://localhost:5001` is a redirect uri of it.
16
+
Before running it, make sure you created an app in your [spotify dashboard](https://developer.spotify.com/dashboard/) and `https://localhost:5543` is a redirect uri of it.
17
17
18
18
```bash
19
19
# Assumes linux and current working directory is the cloned repository
Copy file name to clipboardExpand all lines: SpotifyAPI.Docs/docs/example_cli_persistent_config.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ The access and refresh token is saved in a `credentials.json` file of the curren
11
11
12
12
## Run it
13
13
14
-
Before running it, make sure you created an app in your [spotify dashboard](https://developer.spotify.com/dashboard/) and `https://localhost:5000` is a redirect uri of it.
14
+
Before running it, make sure you created an app in your [spotify dashboard](https://developer.spotify.com/dashboard/) and `https://localhost:5543` is a redirect uri of it.
15
15
16
16
```bash
17
17
# Assumes linux and current working directory is the cloned repository
Copy file name to clipboardExpand all lines: SpotifyAPI.Docs/docs/implicit_grant.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,9 @@ This flow is useful for getting a user access token for a short timespan.
14
14
If you are already in control of a Web-Server (like `ASP.NET`), you can start the flow by generating a login uri:
15
15
16
16
```csharp
17
-
// Make sure "http://localhost:5000" is in your applications redirect URIs!
17
+
// Make sure "http://localhost:5543" is in your applications redirect URIs!
18
18
varloginRequest=newLoginRequest(
19
-
newUri("http://localhost:5000"),
19
+
newUri("http://localhost:5543"),
20
20
"ClientId",
21
21
LoginRequest.ResponseType.Token
22
22
)
@@ -27,7 +27,7 @@ var uri = loginRequest.ToUri();
27
27
// Redirect user to uri via your favorite web-server
28
28
```
29
29
30
-
When the user is redirected to the generated uri, they will have to login with their Spotify account and confirm that your application wants to access their user data. Once confirmed, they will be redirected to `http://localhost:5000` and the fragment identifier (`#` part of URI) will contain an access token.
30
+
When the user is redirected to the generated uri, they will have to login with their Spotify account and confirm that your application wants to access their user data. Once confirmed, they will be redirected to `http://localhost:5543` and the fragment identifier (`#` part of URI) will contain an access token.
31
31
32
32
:::warning
33
33
Note, this parameter is not sent to the server! You need JavaScript to access it.
@@ -77,15 +77,15 @@ For a real example, have a look at the [Example.UWP](https://github.com/JohnnyCr
77
77
78
78
# Using Spotify.Web.Auth
79
79
80
-
For cross-platform CLI and desktop apps (non `UWP` apps), custom protocol handlers are sometimes not an option. The fallback here is a small cross-platform embedded web server running on `http://localhost:5000` serving JavaScript. The JavaScript will parse the fragment part of the URI and sends a request to the web server in the background. The web server then notifies your appliciation via an event.
80
+
For cross-platform CLI and desktop apps (non `UWP` apps), custom protocol handlers are sometimes not an option. The fallback here is a small cross-platform embedded web server running on `http://localhost:5543` serving JavaScript. The JavaScript will parse the fragment part of the URI and sends a request to the web server in the background. The web server then notifies your appliciation via an event.
81
81
82
82
```csharp
83
83
privatestaticEmbedIOAuthServer_server;
84
84
85
85
publicstaticasyncTaskMain()
86
86
{
87
-
// Make sure "http://localhost:5000/callback" is in your spotify application as redirect uri!
Copy file name to clipboardExpand all lines: SpotifyAPI.Docs/docs/pkce.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,9 @@ var (verifier, challenge) = PKCEUtil.GenerateCodes("YourSecureRandomString");
25
25
Like most auth flows, you'll need to redirect your user to Spotify's servers so they are able to grant access to your application:
26
26
27
27
```csharp
28
-
// Make sure "http://localhost:5000/callback" is in your applications redirect URIs!
28
+
// Make sure "http://localhost:5543/callback" is in your applications redirect URIs!
29
29
varloginRequest=newLoginRequest(
30
-
newUri("http://localhost:5000/callback"),
30
+
newUri("http://localhost:5543/callback"),
31
31
"YourClientId",
32
32
LoginRequest.ResponseType.Code
33
33
)
@@ -40,15 +40,15 @@ var uri = loginRequest.ToUri();
40
40
// Redirect user to uri via your favorite web-server or open a local browser window
41
41
```
42
42
43
-
When the user is redirected to the generated uri, they will have to login with their Spotify account and confirm that your application wants to access their user data. Once confirmed, they will be redirected to `http://localhost:5000/callback` and a `code` parameter is attached to the query. The redirect URI can also contain a custom protocol paired with UWP App Custom Protocol handler. This received `code` has to be exchanged for an `access_token` and `refresh_token`:
43
+
When the user is redirected to the generated uri, they will have to login with their Spotify account and confirm that your application wants to access their user data. Once confirmed, they will be redirected to `http://localhost:5543/callback` and a `code` parameter is attached to the query. The redirect URI can also contain a custom protocol paired with UWP App Custom Protocol handler. This received `code` has to be exchanged for an `access_token` and `refresh_token`:
44
44
45
45
```csharp
46
-
// This method should be called from your web-server when the user visits "http://localhost:5000/callback"
46
+
// This method should be called from your web-server when the user visits "http://localhost:5543/callback"
47
47
publicTaskGetCallback(stringcode)
48
48
{
49
49
// Note that we use the verifier calculated above!
0 commit comments