You are viewing limited content. For full access, please sign in.

Question

Question

API Authentication using Postman

asked on November 10, 2023

 

I'm using Postman to help test and put together API calls. 

  • I used url "https://signin.laserfiche.com/oauth/swagger/v1/swagger.json" to import the collection
  • When I send my query I get the below html in response instead of it actually authorizing my request
  • These are the parameters I'm using
    • Note: I set the Client ID to a variable so that I didn't share that publically for security reasons. 
      ​​​​​​​
  • This is the GET url
    • https://signin.laserfiche.com/oauth/Authorize?client_id={{LFv2ClientID}}&redirect_uri=https://api.laserfiche.com/repository/swagger/oauth2-redirect.html&response_type=code&scope=repository.Read repository.Write
0 0

Answer

SELECTED ANSWER
replied on November 10, 2023

So at this point I think it's just an issue of the Access Key you're using.  When you create the Access Key in the Developer Console, make sure to use the option I've selected below in the screenshot...

 

0 0

Replies

replied on November 10, 2023

When I try it in the swagger playground, I get this response

 

0 0
replied on November 10, 2023 Show version history

Jack,

Assuming you've configured your app in our Developer Console and have an authorization token, here is what your Postman sections should look like under Authorization and Body...

 

Authorization section:

 

Body section:

 

That should get you an access token you can then use for calls to the Repository routes.

0 0
replied on November 10, 2023 Show version history

Getting the same response:

0 0
replied on November 10, 2023

Are you talking about the Service Principle Key of the Service Principle user or the Client ID/Client Secret of the app? Also, any idea what this is supposed to look like in swagger?

0 0
replied on November 10, 2023

First, make sure you are using the POST verb, not GET.

 

In the developer console you'll need to create an Access Key...

 

I'd recommend reading our guide on our developer site that will walk you through the process.  And you'll still need to get that access key for Swagger authentication.

0 0
replied on November 10, 2023

So, I figured out that we were using two different calls. Fixed that bit, and now I'm getting this. 

 

I did go through the guide.  When I do, this is the PowerShell that I get back:

This is the response.

0 0
replied on November 10, 2023

I think the 404 is caused by your URL having "HTTP/1.1" at the end.

0 0
replied on November 10, 2023

Figured that was the cause. However, I'm still getting the credentials are misformed response

0 0
SELECTED ANSWER
replied on November 10, 2023

So at this point I think it's just an issue of the Access Key you're using.  When you create the Access Key in the Developer Console, make sure to use the option I've selected below in the screenshot...

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.