# Reader SDK authorization for location issue

**URL:** <https://developer.squareup.com/forums/t/reader-sdk-authorization-for-location-issue/7328>\
**Category:** Questions\
**Tags:** reader-sdk\
**Created:** [October 21, 2022, 3:34am UTC](https://developer.squareup.com/forums/t/reader-sdk-authorization-for-location-issue/7328 "2022-10-21T03:34:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheDude](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/thedude/32/1445_2.png) [@TheDude](https://developer.squareup.com/forums/u/TheDude)\
**Post date:** [October 21, 2022, 3:34am UTC](https://developer.squareup.com/forums/t/reader-sdk-authorization-for-location-issue/7328/1 "2022-10-21T03:34:32Z")

</div>

When authorizing the Reader SDK for a location, we always get a valid authorization code for createMobileAuthorizationCode. However, when a Square account only has one ACTIVE location, there are times that when we then run the `getAuthorizedLocationAsync()` it gives error `rn_auth_location_not_authorized `.

Doing a deauthorization and then authorize again, **sometimes** , solves the issue.

Why would this error occur when mobile auth for the one location succeeds, but then the SDK gives an error?

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [October 21, 2022, 3:56pm UTC](https://developer.squareup.com/forums/t/reader-sdk-authorization-for-location-issue/7328/2 "2022-10-21T15:56:23Z")

</div>

Do you have a time of when this happened and what’s the `location_id` and application ID? 🙂

---

<div class="post-metadata">

**Author:** ![TheDude](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/thedude/32/1445_2.png) [@TheDude](https://developer.squareup.com/forums/u/TheDude)\
**Post date:** [October 21, 2022, 11:53pm UTC](https://developer.squareup.com/forums/t/reader-sdk-authorization-for-location-issue/7328/3 "2022-10-21T23:53:24Z")

</div>

Don’t have a specific time, other than just before I opened this question. I was testing it because one of our users encountered the error several hours before that, for which I do not have the location id.

For the one I was testing with the loc id = LTCD26PPHQ79D  
Our app id = sq0idp-L1CoqB2xfHuXCVW3y9X64A
