# Global

##

### Methods

#### getAccessToken(config, code, callback) → {Promise}

Get access token. To be deprecated soon. Use `Picasa#getTokens` instead

Source:
  - picasa.js, line 362

##### Parameters:

Name | Type | Description
--- | --- | ---
`config` | `object` | Get config here: https://console.developers.google.com/home/dashboard (API Manager > Credentials)
Name | Type | Description
--- | --- | ---
`clientId` | `string` |
`redirectURI` | `string` | URL that user was redirected. After google displays a consent screen to the user, user will be redirect to this URL with a `code` in the URL
`clientSecret` | `string` |
`code` | `string` | Get code from URL param, when user is redirected from authURL. See `Picasa#getAuthURL`
`callback` | `function` | (error, response{accessToken, refreshToken}). If not provided, a promise will be returned

##### Returns:

Type:
  `Promise`

- String accessToken