# OAuth2 Authorization Code Flow

**URL:** <https://community.particle.io/t/oauth2-authorization-code-flow/22215>\
**Category:** Cloud\
**Created:** [April 18, 2016, 5:01pm UTC](https://community.particle.io/t/oauth2-authorization-code-flow/22215 "2016-04-18T17:01:24Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![monkey](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@monkey](https://community.particle.io/u/monkey)\
**Post date:** [December 20, 2017, 10:51pm UTC](https://community.particle.io/t/oauth2-authorization-code-flow/22215/22 "2017-12-20T22:51:37Z")

</div>

Hi @bdh. I’m writing an app in typescript but the cloud api documentation is incomplete. Mind if I ask where you found the /scope and /approve end points? There’s no mention of them in the Cloud API docs… Cheers,

---

<div class="post-metadata">

**Author:** ![bdh](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bdh/32/15794_2.png) [@bdh](https://community.particle.io/u/bdh)\
**Post date:** [December 21, 2017, 8:20pm UTC](https://community.particle.io/t/oauth2-authorization-code-flow/22215/23 "2017-12-21T20:20:30Z")

</div>

Hi @monkey, I was trying to debug my oauth failure so I turned on logging of network traffic in my browser (Chrome developer tools). The /scope and /approve requests show up after the initial /authorize request. You should not need to do anything special for these, they fall out naturally from the protocol for the account linking.

The only end points you need to be concerned with are the authorize and token. As mentioned above, here is the skill configuration information that worked for me (once I used the right version of the protocol!):

- Authorization URL: [https://api.particle.io/oauth/authorize](https://api.particle.io/oauth/authorize)
- Client ID: alexa-1234
- Add Scope: profile
- Redirect URL: _Filled in already for you_
- Authorization Grant Type: Authorization Code Grant
- Access Token URI: [https://api.particle.io/oauth/token](https://api.particle.io/oauth/token)
- Client Secret: _xxxxxxxxxxxxxxxxxxx_
- Client Authentication Scheme: HTTP Basic
- Leave ‘Send Alexa Events’ unchecked for now
- Privacy Policy: [https://www.particle.io/legal/privacy](https://www.particle.io/legal/privacy)

I did eventually get my code working with Alexa V3 protocol but it had a number of changes from V2. I wrote it in Python and could post that if there was interest.

Cheers

---

<div class="post-metadata">

**Author:** ![Aarya](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@Aarya](https://community.particle.io/u/Aarya)\
**Post date:** [April 14, 2018, 2:42pm UTC](https://community.particle.io/t/oauth2-authorization-code-flow/22215/24 "2018-04-14T14:42:12Z")

</div>

The above method works fine Non org accounts (Non Customer Account) but not able to able to login with customer’s credentials.

Is there any different oauth URL for customer login?

---

<div class="post-metadata">

**Author:** ![kushal.parmar](https://avatars.discourse-cdn.com/v4/letter/k/4bbf92/32.png) [@kushal.parmar](https://community.particle.io/u/kushal.parmar)\
**Post date:** [November 30, 2018, 1:42pm UTC](https://community.particle.io/t/oauth2-authorization-code-flow/22215/25 "2018-11-30T13:42:41Z")

</div>

Has anybody been able to figure the account linking for Alexa Smart Home Skill for Customer Login (and not non org accounts)?

I get the following if I try and login with the customer credentials:

 ![IMG_6061](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/5/4/54ca62e76e8922b915accb68c886f871271a4ef9.jpg)

[Previous page](https://community.particle.io/t/oauth2-authorization-code-flow/22215.md?page=1)
