# Android Lock Get Authorization Code field and the Code Verifier

**URL:** <https://community.auth0.com/t/android-lock-get-authorization-code-field-and-the-code-verifier/6499>\
**Category:** Get Help\
**Tags:** android, pkce, verifier, authorization, lock\
**Created:** [May 5, 2017, 11:20am UTC](https://community.auth0.com/t/android-lock-get-authorization-code-field-and-the-code-verifier/6499 "2017-05-05T11:20:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Hartz](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/matthew_hartz/32/11896_2.png) [@Matthew\_Hartz](https://community.auth0.com/u/Matthew_Hartz)\
**Post date:** [May 5, 2017, 11:20am UTC](https://community.auth0.com/t/android-lock-get-authorization-code-field-and-the-code-verifier/6499/1 "2017-05-05T11:20:11Z")

</div>

Hi,

I’m trying to use Android Lock to get the authorization code and code verify via the Authorize endpoint. Is this possible?

Thanks!

@abhishek.hingnikar if you’re online 😉

---

<div class="post-metadata">

**Author:** ![Matthew\_Hartz](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/matthew_hartz/32/11896_2.png) [@Matthew\_Hartz](https://community.auth0.com/u/Matthew_Hartz)\
**Post date:** [May 5, 2017, 1:40pm UTC](https://community.auth0.com/t/android-lock-get-authorization-code-field-and-the-code-verifier/6499/2 "2017-05-05T13:40:00Z")

</div>

apparently this got it to work

```
    mAuth = new Auth0(getString(R.string.auth0_client_id), getString(R.string.auth0_domain));
    mAuth.setOIDCConformant(true);
    mAuth.setLoggingEnabled(true);

    //Request a refresh token along with the access token.
    mLock = Lock.newBuilder(mAuth, mCallback)
            .closable(true)
            .withAudience(getString(R.string.auth0_audience))
            .withScope("openid")
            .build(this);

```

Now I just use the access\_token and everything works.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:53am UTC](https://community.auth0.com/t/android-lock-get-authorization-code-field-and-the-code-verifier/6499/3 "2018-03-02T05:53:43Z")

</div>


