Open Closed

External API access #4672


User avatar
0
jmalla.cp created
  • ABP Framework version: v6.0.1
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Tired
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi,

I want to publish an API access from a 3rd external party like a Postman.

These ara the step I followed: 1.- Create the new client_id 2.- Acced from Postman to the URI https://localhost:44335/connect/token with client_id, secret and more 3.- I have obtenied the access_token *****************************

But with this token I can't call the API, because the request is 401 Unauthorized

For example: https://localhost:44368/api/openiddict/applications with header => Authorization: Bearer *****************************

What am I doing wrong?

Thanks for all


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Acced from Postman to the URI https://localhost:44335/connect/token with client_id, secret and more

    What is the http request info?

    What is the accesstoken value you got from postman?

    But with this token I can't call the API, because the request is 401 Unauthorized

    Please share full error logs.

  • User Avatar
    0
    jmalla.cp created

    Hi,

    Sorry maliming, Now it's going well, I think yesterday I was really obfuscated with this topic.

    On the other hand, could you tell me if there is another option to create and maintain access tokens per user from the web interface?

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    On the other hand, could you tell me if there is another option to create and maintain access tokens per user from the web interface?

    Using OAuth flow to get access_token is the right way.

    https://auth0.com/docs/get-started/authentication-and-authorization-flow/which-oauth-2-0-flow-should-i-use

  • User Avatar
    0
    jmalla.cp created

    Ok, thanks for your information

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11