v1

latestOpenAPI 3.0.0Apache 2.02026-07-142008071.1 MB
MobileAuthorization

CreateMobileAuthorizationCode

Generates code to authorize a mobile application to connect to a Square card reader

Authorization codes are one-time-use and expire 60 minutes after being issued.

Important: The Authorization header you provide to this endpoint must have the following format:

Authorization: Bearer ACCESS_TOKEN

Replace ACCESS_TOKEN with a valid production authorization credential.

post/mobile/authorization-code

Request body

location_idstring

The Square location ID the authorization code should be tied to.

Example request

{
  "request_body": {
    "location_id": "YOUR_LOCATION_ID"
  },
  "request_url": "/mobile/authorization-code"
}

Response

Success

authorization_codestring

Generated authorization code that connects a mobile application instance to a Square account.

expires_atstring

The timestamp when authorization_code expires in RFC 3339 format, e.g., "2016-09-04T23:59:33.123Z".

Example response

{
  "authorization_code": "YOUR_MOBILE_AUTHORIZATION_CODE",
  "expires_at": "2019-01-10T19:42:08Z"
}
All 200 operations