---
title: "Returns the access_token in exchange of AppId, AppSecret, Code/RefreshToken. Note: the key “AppSecert” has been deprecated and will be removed in a future update."
method: POST
path: "/OAuth/GetAccessToken"
tags: ["OAuth"]
---

# Returns the access_token in exchange of AppId, AppSecret, Code/RefreshToken. Note: the key “AppSecert” has been deprecated and will be removed in a future update.

`POST /OAuth/GetAccessToken`

## Request

- Base URL: `https://ws.yourmembership.com`
- URL: `https://ws.yourmembership.com/OAuth/GetAccessToken`
- Auth: none declared. Required headers: `Accept`
- TypeScript: <https://skmtc.dev/yourmembership/apis/ym-rest-services/docs/OAuth/GetAccessToken/post.ts> (a function with typed inputs; its response is checked against the schema)

Returns the access_token in exchange of AppId, AppSecret, Code/RefreshToken. Note: the key “AppSecert” has been deprecated and will be removed in a future update.

## Request body `application/x-www-form-urlencoded`

- object
  - `GrantType` 'Code' | 'RefreshToken'
  - `AppId` string
  - `AppSecert` string: This key has been deprecated and will be removed in a future update. Please use the “AppSecret” key.
  - `Scope` string
  - `Code` string
  - `RefreshToken` string
  - `AppSecret` string: This key replaces the “AppSecert” key.

## Response `200`

Success

- Object: Object

---

[API](https://skmtc.dev/yourmembership/apis/ym-rest-services.md) - [All operations](https://skmtc.dev/yourmembership/apis/ym-rest-services/llms.txt) - [OpenAPI document](https://skmtc.dev/yourmembership/apis/ym-rest-services/revisions/8d8a2e7e7d56?raw)
