# "The authorization server id is invalid" error while trying api endpoints using Postman

**URL:** <https://devforum.okta.com/t/the-authorization-server-id-is-invalid-error-while-trying-api-endpoints-using-postman/19420>\
**Category:** Questions\
**Created:** [February 16, 2022, 9:41am UTC](https://devforum.okta.com/t/the-authorization-server-id-is-invalid-error-while-trying-api-endpoints-using-postman/19420 "2022-02-16T09:41:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![him89088](https://avatars.discourse-cdn.com/v4/letter/h/0ea827/32.png) [@him89088](https://devforum.okta.com/u/him89088)\
**Post date:** [February 16, 2022, 9:41am UTC](https://devforum.okta.com/t/the-authorization-server-id-is-invalid-error-while-trying-api-endpoints-using-postman/19420/1 "2022-02-16T09:41:05Z")

</div>

Hi

I’m very new to Okta. I’ve been following the tutorial for an SPA using React, implementing Login/Logout functionality. It works fine.

The issue I’m facing is when I’m trying to hit endpoints using Postman. I am able to hit the `/authorize` endpoint and get the access\_code and id\_token. I’m able to hit `/userinfo` as well. But when I try to hit any of the  
`https://${yourOktaDomain}/api/v1/` endpoints. Whenever I do, I get **Status 400** , and checking the logs in Postman, this is what’s returned in the Response Header:

```auto
www-authenticate: Bearer authorization_uri="http://${yourOktaDomain}/oauth2/v1/authorize", realm="http://${yourOktaDomain}", scope="okta.myAccount.read", error="invalid_request", error_description="The authorization server id is invalid.", resource="/api/v1/myaccount"

```

I think the issue is with authorization\_uri, as I believe it should be /oauth2/ **default** /v1/authorize  
It’s missing the authorization server ID, i.e. “default” in this case. Is that correct?

If so, any idea how to fix that? I’m sure there might be a configuration step I’m missing. Any help is appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![Lijia](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/lijia/32/2295_2.png) [@Lijia](https://devforum.okta.com/u/Lijia)\
**Post date:** [February 16, 2022, 10:15pm UTC](https://devforum.okta.com/t/the-authorization-server-id-is-invalid-error-while-trying-api-endpoints-using-postman/19420/2 "2022-02-16T22:15:18Z")

</div>

@him89088 Hi,  
Please check the doc for the authorization server types.

> **[Authorization Servers | Okta Developer](https://developer.okta.com/docs/concepts/auth-servers/#org-authorization-server)**
>
> An overview of what an authorization server is and the types of authorization servers available at Okta.

It depends on if you have the access to custom auth server (include default custom and custom authorization servers): [Authorization Servers | Okta Developer](https://developer.okta.com/docs/concepts/auth-servers/#custom-authorization-server). To verify that, you can check if you have the access to metadata:  
xxxx/.well-known/openid-configuration  
If not have the access, you can only use Okta org server: [Authorization Servers | Okta Developer](https://developer.okta.com/docs/concepts/auth-servers/#org-authorization-server)

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 16, 2022, 11:08pm UTC](https://devforum.okta.com/t/the-authorization-server-id-is-invalid-error-while-trying-api-endpoints-using-postman/19420/3 "2022-02-16T23:08:52Z")

</div>

Are you having this 400 error with all of our /api/v1/ endpoints? How are you authorizing your call: are you trying to [use OAuth tokens for authorization for these endpoints](https://developer.okta.com/docs/guides/implement-oauth-for-okta/main/)?

---

<div class="post-metadata">

**Author:** ![him89088](https://avatars.discourse-cdn.com/v4/letter/h/0ea827/32.png) [@him89088](https://devforum.okta.com/u/him89088)\
**Post date:** [February 17, 2022, 12:56pm UTC](https://devforum.okta.com/t/the-authorization-server-id-is-invalid-error-while-trying-api-endpoints-using-postman/19420/4 "2022-02-17T12:56:47Z")

</div>

Hi

I’m using the Default Custom Authorization Server. And when I hit the `/.well-known/openid-configuration` endpoint, I get Status 200 response, along with the metadata object.

---

<div class="post-metadata">

**Author:** ![him89088](https://avatars.discourse-cdn.com/v4/letter/h/0ea827/32.png) [@him89088](https://devforum.okta.com/u/him89088)\
**Post date:** [February 17, 2022, 12:58pm UTC](https://devforum.okta.com/t/the-authorization-server-id-is-invalid-error-while-trying-api-endpoints-using-postman/19420/5 "2022-02-17T12:58:26Z")

</div>

Yes @andrea I am getting the 400 error with all the `/api/v1/` endpoints. I am following the steps in the link you provided through Postman. I am able to get the token, and set it as well. I am just not able to hit any `/api/v1/` endpoints.

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 17, 2022, 5:10pm UTC](https://devforum.okta.com/t/the-authorization-server-id-is-invalid-error-while-trying-api-endpoints-using-postman/19420/6 "2022-02-17T17:10:16Z")

</div>

First off, if you are using OAuth for Okta, you need to use the [Org authorization server](https://developer.okta.com/docs/concepts/auth-servers/#org-authorization-server-discovery-endpoints) when requesting tokens to send back to Okta, e.g. [https://org.okta.com/.well-known/openid-configuration](https://org.okta.com/.well-known/openid-configuration). Confusingly, this is different from the one we call “Default,” so make sure you’re using the right one! At this time, custom authorization servers (like Default) are incompatible with OAuth for Okta and Access Tokens issued by these servers cannot be used against Okta’s own management endpoints.

Second, when you _do_ use the Org server, what scopes are you requesting?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [February 8, 2024, 9:33pm UTC](https://devforum.okta.com/t/the-authorization-server-id-is-invalid-error-while-trying-api-endpoints-using-postman/19420/7 "2024-02-08T21:33:58Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
