# Migrating existing v2 API application to v3 OAuth2

**URL:** <https://community.bluescape.com/t/migrating-existing-v2-api-application-to-v3-oauth2/3607>\
**Category:** Developer\
**Tags:** api\
**Created:** [May 17, 2023, 3:37pm UTC](https://community.bluescape.com/t/migrating-existing-v2-api-application-to-v3-oauth2/3607 "2023-05-17T15:37:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kkoechley](https://sea1.discourse-cdn.com/bluescape/user_avatar/community.bluescape.com/kkoechley/32/2474_2.png) [@kkoechley](https://community.bluescape.com/u/kkoechley)\
**Post date:** [May 17, 2023, 3:37pm UTC](https://community.bluescape.com/t/migrating-existing-v2-api-application-to-v3-oauth2/3607/1 "2023-05-17T15:37:55Z")

</div>

## Introduction

> Bluescape v2 APIs are being decommissioned in 2023. All v2 APIs will lose support, and all requests sent to v2 endpoints will fail once decommissioning is complete. Visit our [v3 API documentation](https://community.bluescape.com/t/api-documentation-landing-page/2174) to familiarize yourself with details on v3 API use.

We have updated our OAuth2 flows from v2 to v3. Following the process below generates updated v3 tokens.

It is very simple to migrate [existing applications](https://client.apps.us.bluescape.com/my/profile) found under “My Applications” on your user profile page. You can use your existing application clientId and clientSecret, but you must update both the OAuth Authorization Url and the Authorization Token endpoints.

We now require you use the following scope input argument for the Authorization call:

```auto
    //mandatory for v3
    const client_scope = "scope=v2legacy offline_access";

```

### Old v2 endpoints

OAuth Authorization URL:  
`https://api.apps.us.bluescape.com/authorize`

Authorization Token endpoint:  
`https://identity-api.apps.us.bluescape.com/api/v2/oauth2/token`

### New v3 endpoints:

OAuth Authorization URL:  
`https://api.apps.us.bluescape.com/v3/oauth2/authorize`

Authorization Token endpoint:  
`https://api.apps.us.bluescape.com/v3/oauth2/token`

**For example:**

```auto
const base_API = "api.apps.us.bluescape.com";
const base_auth_url = `https://${base_API}/v3/oauth2/authorize`;
const token_endpoint = `https://${base_API}/v3/oauth2/token`;
const client_scope = "scope=v2legacy offline_access";

```

> # Where to Next?
> 
> - [API Reference v3](https://community.bluescape.com/t/api-reference-v3/624)
> - [API Reference Pagination v3](https://community.bluescape.com/t/api-reference-pagination-v3/626)
> - [Bluescape API Guides Landing Page](https://community.bluescape.com/t/bluescape-api-guides-landing-page/2020)
> 
> **Not what you were looking for? Reply below or [Search](https://community.bluescape.com/search) the community and discover more Bluescape.**

---

<div class="post-metadata">

**Author:** ![kkoechley](https://sea1.discourse-cdn.com/bluescape/user_avatar/community.bluescape.com/kkoechley/32/2474_2.png) [@kkoechley](https://community.bluescape.com/u/kkoechley)\
**Post date:** [May 17, 2023, 3:44pm UTC](https://community.bluescape.com/t/migrating-existing-v2-api-application-to-v3-oauth2/3607/2 "2023-05-17T15:44:40Z")

</div>

Pinned on May 17, 2023, 3:44pm UTC


