---
title: "Retrieve the access token issued by a third-party social provider"
method: GET
path: "/api/my-account/identities/{target}/access-token"
tags: ["My account"]
---

# Retrieve the access token issued by a third-party social provider

`GET /api/my-account/identities/{target}/access-token`

This API retrieves the access token issued by a third-party social provider for a given social target. 
Access is only available if token storage is enabled for the corresponding social connector.
When a user authenticates through a social provider, Logto automatically stores the provider’s tokens in an encrypted form.
You can use this API to securely retrieve the stored access token and use it to access third-party APIs on behalf of the user.

## Path parameters

- `target` string, required

## Response `200`

The access token was retrieved successfully.

- object
  - `access_token` string, required
  - `scope` string
  - `token_type` string
  - `expires_in` union
    - number
    - string

## Other responses

- `400` — Bad Request
- `401` — Permission denied, the access_token is expired and the offline_access scope is not granted or expired.
- `403` — Forbidden
- `404` — The social identity does not exist or the access token is not available.
- `422` — Unprocessable Content

---

[API](https://skmtc.net/logto/apis/logto-api-references.md) · [All operations](https://skmtc.net/logto/apis/logto-api-references/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/logto/logto-api-references/versions/a163dc77d842/schema)
