Get Developer Credentials

Applies to: Orders API

Learn how to get Sandbox developer credentials and create an optional test account.

Link to section

Developer credentials

Get Sandbox developer credentials for your default test application:

  1. Open the Developer Console. You're prompted to sign in or create an account.

  2. Create a Square application and name it Order-Ahead App.

  3. Choose Order-Ahead App to open your Square application settings page.

  4. Confirm that Sandbox mode is selected at the top of the page.

  5. On the Credentials page, scroll down and copy the values for Sandbox Application ID.

    An animation showing the process for getting application credentials and location ID in the Developer Console.

Link to section

Sandbox test account

You should create a new test account for this sample application. If you've been creating catalog items in an existing test account, the sample application displays them in the menu page along with the food items seeded by the sample.

To create a new Sandbox test account:

  1. Open the Developer Console.
  2. In the left pane, choose Sandbox Test Accounts.
  3. Choose + New sandbox test account to create a new account.
  4. In the Sandbox test account name box, enter Cate's Deli or whatever name you want to use.
  5. In the Country box, choose your country.
  6. Don't enable Include seed data.
  7. Choose Save.

Note

If you create a test account with a seeded dataset, the food items seeded by this sample application are co-mingled with the flower shop items created by the Developer Console seeding script. To avoid this problem, you should create a Sandbox test account without the seeded data.

Link to section

Get a Sandbox access token

You need to authorize your application to access the new Sandbox test account instead of the default test account that was created for you. To grant authorization, follow these steps:

  1. In the Developer Console, choose the Order-Ahead application.
  2. In the left pane, choose OAuth.
  3. Choose Authorize test account.
  4. Choose the new Sandbox test account.
  5. Leave all individual permissions selected.
  6. Choose Save.
  7. Copy the new access token from the Access token column of the table.

Use the access token to configure the sample application.

Did you know?

In your production application, you can use the OAuth API to let sellers grant your application access to their account. For more information, see OAuth Walkthrough.