# How do we use "code" in response\_type?

**URL:** <https://community.auth0.com/t/how-do-we-use-code-in-response-type/64904>\
**Category:** Get Help\
**Created:** [June 23, 2021, 6:34am UTC](https://community.auth0.com/t/how-do-we-use-code-in-response-type/64904 "2021-06-23T06:34:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nnahito](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nnahito/32/15686_2.png) [@nnahito](https://community.auth0.com/u/nnahito)\
**Post date:** [June 23, 2021, 6:34am UTC](https://community.auth0.com/t/how-do-we-use-code-in-response-type/64904/1 "2021-06-23T06:34:31Z")

</div>

I would like to use the API to do social login.  
How do I use the response\_type “code” in the following document?  
[https://auth0.com/docs/api/authentication?http#social](https://auth0.com/docs/api/authentication?http#social)

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [June 23, 2021, 1:36pm UTC](https://community.auth0.com/t/how-do-we-use-code-in-response-type/64904/3 "2021-06-23T13:36:45Z")

</div>

Hi @nnahito,

In OAuth’s [authorization code flow](https://auth0.com/docs/flows/authorization-code-flow), the `code` is exchanged for an Access Token and an ID Token. The code will be used in the body of the `/oauth/token` endpoint: [Authentication API Explorer](https://auth0.com/docs/api/authentication?#authorization-code-flow45)

Note: we have many SDKs that make this exchange easy: [https://auth0.com/docs/quickstarts/](https://auth0.com/docs/quickstarts/)

---

<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:** [July 8, 2021, 1:37pm UTC](https://community.auth0.com/t/how-do-we-use-code-in-response-type/64904/4 "2021-07-08T13:37:16Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
