spotify project Flashcards

1
Q

scope (in the context of OAuth) (3)

A

1 a string value that indicates a specific permission or set of permissions that the application is requesting.

2 scopes limit the application’s access to the user’s account to only the permissions explicitly granted by the user.

3 This enhances security by ensuring that the application can only perform actions or access data that the user has authorized.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what happens when an application requests uthoriztion?

A

it specifies the scopes it needs. For example, if an application needs to read the user’s playlist and modify it, it might request the playlist-read-private and playlist-modify-public scopes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how do scopes work? (4)

A

1 Requesting Scopes: When an application requests authorization, it specifies the scopes it needs. For example, if an application needs to read the user’s playlist and modify it, it might request the playlist-read-private and playlist-modify-public scopes.

2 User Consent: The user is presented with a consent screen that lists the requested scopes. The user can then decide whether to grant or deny these permissions.

4 Access Token: If the user consents, an access token is issued with the granted scopes embedded. The application uses this token to make API requests.

5 API Requests: The access token is sent with each API request. The API server checks the token to ensure it has the necessary scopes for the requested operation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

uri def

A

a string that identifies a resource, either by location, name, or both. It provides a simple and extensible means for identifying a resource.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

parts of a uri (5)

A

1 Scheme: Specifies the protocol or method used to access the resource (e.g., http, https, ftp, mailto).

2 Authority: Includes the domain name or IP address and, optionally, the port number (e.g., example.com, localhost:8888).

3 Path: The specific location of the resource within the authority (e.g., /path/to/resource).

4 Query: Provides additional parameters for accessing the resource (e.g., ?key1=value1&key2=value2).

5 Fragment: Refers to a specific part within the resource (e.g., #section1).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is a client id?

A

a unique identifier assigned to your application by Spotify when you register your app on the Spotify Developer Dashboard. identifies your application to spotify

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

client secret

A

a confidential string associated with your client ID, also provided by Spotify when you register your app.
Purpose: It is used, along with the client ID, to authenticate your application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

redirect_uri

A

the URI where Spotify will redirect the user after they have logged in and authorized your application.

Example: ‘http://localhost:8888/callback’
Purpose: It is used to capture the authorization code that Spotify sends back to your application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

auth_manager parameter

A

this parameter takes an instance of SpotifyOAuth, which handles the authentication process and manages the access tokens required for making authenticated API requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is the oauth authenitcation flow?

A

1 OAuth Flow Initiation: When you run this line, SpotifyOAuth initiates the OAuth flow.

2 User Authorization: The user is redirected to Spotify’s authorization page to log in and grant the requested permissions.

3 Redirect to Redirect URI: After the user authorizes your application, Spotify redirects the user to the specified redirect_uri with an authorization code.

4 Authorization Code Exchange: SpotifyOAuth exchanges the authorization code for an access token.

5 Authenticated API Requests: The spotipy.Spotify object (sp) can now use this access token to make authenticated requests to the Spotify Web API.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly