The resource server does not exist: 'http://localhost/api/v1/'

I am trying to assign permission under a role using the Custom API identifier but getting an inexistent_resource_server error from the auth0 response.

API: https://auth0-domain/api/v2/users/google-oauth2|114917316204755618/permissions

Request:

{
      "permissions": [
            {
                  "resource_server_identifier": "http://localhost/api/v1/",
                  "permission_name": "hello:world"
            }
      ]
}

Response:

{
      "statusCode": 404,
      "error": "Not Found",
      "message": "The resource server does not exist: 'http://localhost/api/v1/'",
      "errorCode": "inexistent_resource_server"
}

Hey there @pattnaikdeeptiman welcome to the community!

What happens if you use http://localhost/api/v1 as opposed to http://localhost/api/v1/ in your request?

Hi @tyf , Thanks it really worked. what’s the special case by omitting ‘/’ , why it’s not working with ‘/’ ?

1 Like

Awesome that’s good to know, and thanks for the update :slight_smile: The identifier just needs to be an exact match so the trailing / is enough to throw it off.

1 Like

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