# Authenticate External Request in Embedded App

**URL:** <https://community.shopify.dev/t/authenticate-external-request-in-embedded-app/22182>\
**Category:** Authentication & Access\
**Tags:** oauth\
**Created:** [September 4, 2025, 6:22pm UTC](https://community.shopify.dev/t/authenticate-external-request-in-embedded-app/22182 "2025-09-04T18:22:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LT-Jed](https://avatars.discourse-cdn.com/v4/letter/l/85e7bf/32.png) [@LT-Jed](https://community.shopify.dev/u/LT-Jed)\
**Post date:** [September 4, 2025, 6:22pm UTC](https://community.shopify.dev/t/authenticate-external-request-in-embedded-app/22182/1 "2025-09-04T18:22:57Z")

</div>

I have a remix embedded app that provides UI to the user however I also want to allow POST requests from a external source onto one of the embedded app routes.

I got a access token from running on a page in my embedded app:

```auto
const { session } = await authenticate.admin(request);
const accessToken = session.accessToken;

```

To my understanding this value is an offline access token for that specific store and my app.

I then took that value of “shpat\_xxxxxxxxxxxxxxx” and passed it as the value of the “x-shopify-access-token” header on the external POST request.

However, when that external post request comes through and it reaches:

```auto
const { admin } = await authenticate.admin(request);

```

It is failing to authenticate and attempting to redirect to /auth/login.

What am I missing? Is this not the way to authenticate a external request?

---

<div class="post-metadata">

**Author:** ![KyleG-Shopify](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/kyleg-shopify/32/6799_2.png) [@KyleG-Shopify](https://community.shopify.dev/u/KyleG-Shopify)\
**Post date:** [September 4, 2025, 8:01pm UTC](https://community.shopify.dev/t/authenticate-external-request-in-embedded-app/22182/2 "2025-09-04T20:01:08Z")

</div>

Hey @LT-Jed,

I would suggest taking a look at our [authentication documentation](https://shopify.dev/docs/apps/build/authentication-authorization). This covers the different authentication patterns for different use cases.

In particular, review the sections on [session tokens](https://shopify.dev/docs/apps/build/authentication-authorization/session-tokens), [token exchange](https://shopify.dev/docs/apps/build/authentication-authorization/access-tokens/token-exchange), and the differences between [online and offline access tokens](https://shopify.dev/docs/apps/build/authentication-authorization/access-tokens/offline-access-tokens) to understand the different authentication flows.
