<- Mobile Authorization API

Mobile Authorization API

All versions ->

Create mobile authorization code

POST

 /mobile/authorization-code

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

Authorization codes are one-time-use codes 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.

Permissions:PAYMENTS_WRITE_IN_PERSON
Try in API Explorer
Link to section

Request body

Example code

Link to section

location_id

string

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

Link to section

Response fields

Link to section

authorization_code

string

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

Link to section

expires_at

string

The timestamp when authorization_code expires, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").

Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:

UTC: 2020-01-26T02:25:34Z

Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00

Link to section

errors

Any errors that occurred during the request.