AuthManager src/managers/Auth.ts#L22
A manager to perform actions regarding the authorization to the web api.
Properties:
tokenMethods:
getApiToken getUserTokenconstructor(token) src/managers/Auth.ts#L22
No documentation found.
| Name | Type | Description |
|---|---|---|
| token | string | Your spotify web api token. |
.getApiToken(clientID, clientSecret) src/managers/Auth.ts#L31
Returns an api token from your spotify application client id and client secret!
await auth.getApiToken('id', 'secert');Returns:
Parameters:
| Name | Type | Description |
|---|---|---|
| clientID | string | Your spotify app's client id. |
| clientSecret | string | Your spotify app's client secret. |
.getUserToken(options) src/managers/Auth.ts#L62
Returns a acces token of a spotify user through the authorization process.
await auth.getUserToken({
clientID: 'id',
clientSecret: 'secret',
code: 'code', // If attempting to get user token through authorization
refreshToken: 'token', // If attempting to refresh token!
redirectURL: 'url' // Needs to be the same what you have enetered while authorizing the token!
})Returns:
Parameters:
| Name | Type | Description |
|---|---|---|
| options | GetUserTokenOptions | Options required to get spotify user token! |