Applies to: Mobile Authorization API | Reader SDK
Use the Mobile Authorization API to request authorization tokens to initialize Square mobile solutions like the Reader SDK.
To embed Square mobile development solutions, you must create a service to request mobile authorization codes. You should integrate this into your existing OAuth process if possible.
Requirements and limitations
To build with the Mobile Authorization API, the following must be true:
- You're using HTTPS - HTTPS is required for all production Square API calls. HTTP calls are only supported for developing and testing on localhost.
- You're using production credentials - The Mobile Authorization API isn't supported in the Square Sandbox.
Additionally, you need the following information:
Add code to use the location ID and OAuth token to request a mobile authorization code. The authorization service should return the mobile authorization code to the calling application but for the sake of this example, Square simply prints it to the screen.