# Generate button (/log-in/generate-button)



Follow these steps to generate the JavaScript for the **Log in with PayPal** button:

## Configure button [#configure-button]

Modify the following fields to personalize the **Log in with PayPal** button. When you're finished, use the following dynamically generated Javascript.

<LogInButtonGeneratorForm />

## Generate JavaScript [#generate-javascript]

Test the generated button. Once it works to your satisfaction, add the following generated HTML code into your site.

<LogInButtonGeneratorOutput />

For recommendations on where to place this button on your site, see [Button placement](/log-in/button-placement/).

## Modify JavaScript [#modify-javascript]

You can optionally modify the generated JavaScript button code with the following parameters:

| Parameter      | Required | Description                                                                                                                                                                                                                                       |
| -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `appid`        |          | The application ID (the *client ID* [from PayPal app creation](/api/get-started)).<br /> &#x2A;*Note:** &#x2A;*Note:** The *application ID* and *client ID* terms are used interchangeably.                                                       |
| `authend`      | Optional | The authorization server URL: Pass `sandbox` for the test environment. Otherwise, for live, omit this value.                                                                                                                                      |
| `scope`        |          | The profile information requested ([available scopes](/log-in/references#scope-attributes)).                                                                                                                                                      |
| `locale`       |          | Language and country specifier.                                                                                                                                                                                                                   |
| `buttonSize`   |          | The button size specifier:<br /> `sm`. Small.`md`. Medium.`lg`. Large.                                                                                                                                                                            |
| `theme`        | Optional | The button styling: PayPal blue or neutral.<br />                                                                                                                                                                                                 |
| `returnurl`    |          | The page to return to after successful login.<br />                                                                                                                                                                                               |
| `responseType` |          | The response type specifier:<br /> `code``id_token``code` & `id_token`                                                                                                                                                                            |
| `fullpage`     |          | The full page specifier:<br /> `true``false`. Default is mini browser.                                                                                                                                                                            |
| `nonce`        | Optional | The nonce specifier can be a random number, for example 11111111. If you don't provide this parameter, the return url redirection behavior is mini browser.If you provide the parameter with a random number, it will redirect to parent browser. |

Next steps:

* [Get access token](/log-in/build#3-get-access-token)
