Strategic MLS Alliance - invalid_client
Having trouble getting a bearer_token using https://smlsa.paragonrels.com/OData/S... and the MLS has been no help, referring me back to you. Here's the info they gave me (without the password)
MLS Name: Strategic MLS Alliance MLS ID: SMLSA New Paragon Login: smlsaiHouseWeb New Paragon PW: Use current password New RETS Web API: https://smlsa.paragonrels.com/OData/SMLSA/Strategic_17 Web API Metadata: http://smlsa.paragonrels.com/OData/SMLSA/Strategic_17/$metadataThe Data Systems link above will provide a bird’s eye view of the resources available The individual resource URLs that include the “Strategic_17” parameter are the data dictionary URLs and these are the ones you should use.
Postman Access Sample Below is an example of how‐to setup data access in Postman.com:
Type: OAuth 2.0 Token Name: [create your own] Grant Type: Client Credentials Access Token URL: https://smlsa.paragonrels.com/OData/SMLSA/identity/connect/token Client ID: [your login credentials] SEE ABOVE Client Secret: [your password credentials] Scope: OData Client Authorization: Send as Basic Auth Header Click Request Token ‐ When token returns, scroll down and click ‘Use Token’
I plugged in the setting to our in-house commandline client and I get 2 different errors depending on what I put in for Grant Type: For various permutations of 'Client Credentials' ('ClientCredentials','Client_Credentials','Client+Credentials') I get {"error":"unsupported_grant_type"}
/usr/local/bin/curl --silent -X POST --output "token.json" -d "Grant_Type=Client Credentials&Client_Id=smlsaiHouseWeb&Client_Secret=[REDACTED]" -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" -k "https://smlsa.paragonrels.com/OData/SMLSA/identity/connect/token"
If I use 'password' like some other APIs use I get {"error":"unauthorized_client"}
/usr/local/bin/curl --silent -X POST --output "token.json" -d "Grant_Type=password&Client_Id=smlsaiHouseWeb&Client_Secret=[REDACTED]" -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" -k "https://smlsa.paragonrels.com/OData/SMLSA/identity/connect/token"
I signed up for Postman.com and tried there too with the same results.
I have no clue which setting I'm doing wrong and I'm hoping the bearer_token, once I get it, doesn't change per session.
Little help? -len
Comments
Hi Len,
I've used the settings from our guide (which the MLS gave you) and was able to get a Token for your user. The Postman Console showed me these, which seem to match you are using. Of course client_secret doesn't show in the console.
I'm not sure if capitalization would be an issue, but that's really the only difference I can see between your result and mine.
Hmm when I try in Postman using just parameters, no additional headers, the Post line looks like this:
And the the response is "unsupported_grant_type"
When I use OUR client, using the all lowercase "client_credentials" I now get a different error "Dataset not found""
Hi Len,
This is a headscratcher. I'll have to continue to review tomorrow, as no solutions are coming to light.
Sounds good. I'm off for the day so that suits me fine :-) Thanks
Hi Joe, I'm back online if you have any other ideas.
In Postman I tried again, limiting it to just 3 params grant_type client_id client_secret
and I get "invalid client".
If I add our username and password to the authentication section I get "unsupported grant_type"
Hi Len,
Unfortunately, we haven't found a solution to your issue. We haven't even been able to come up with a setup to reproduce your error with your credentials. We're a bit unsure as to what the root cause would be. The only thing that I could think of that's different for Postman is that we've installed the program, and you said you're using the built in browser program at postman.com. Though, that only covers that piece.
Welp maybe I can attack this from another angle. Paragon have a very nice set of documentation at https://paragonapi.com/docs/platform/ which I use all the time for my other Paragon API feeds. Do you know if there are similar docs for this https://smlsa.paragonrels.com/OData/S... feed? For my other Paragon feeds (and Bridge interactive) I'm just given the bearer token and I include that in the headers for each request. I'm really hoping they have some docs available. The MLS has little info.