For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 2 3 5

Postman error message malformed request

hi - trying to formulate an API request with Postman. Despite copying all the set up and following step by step i get the following error message.


{ "error": { "message": "Malformed request payload: Syntax error at Line 2, Char 1: expected '}' " }}


I am following the tutorial here and got to step 7


Body raw test is:


{

"Credentials": {

"Username": "foo",

"Password": "foo_pass"

}

}


Tutorials | Refinitiv Developers

dsserror
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
32.2k 40 11 19

Hi @mbh181 ,

I would try hardcoding the creds into the request now that "malformed request" is gone.

Suspect something goes off with the substitution from the environment, but we can verify it this way.

Replace the curly brackets with variables dss-user and dss-password with double-quoted valid creds, for example:

{
  "Credentials": {
    "Username": "youruser",
    "Password": "yourpassword"
  }
}

what do you see?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
32.2k 40 11 19

Hello @mbh181 ,

It's hard to tell from the provided information, the request does not look wrong to me. In order to avoid small typos and invisible characters that are very hard to detect this way. Please try to:

1. Download starter Postman collection from DSS REST Tutorials Postman collection .

2. Import starter collection and and starter environment.

3. Replace your credentials into environment.

4. Try User authentication- let us know the result without exposing your creds

Hope this information helps.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 2 3 5

Hi @zoya faberov

I have tried this and this was unsuccessful.

1639488160196.png

1639488106790.png



1639488160196.png (16.8 KiB)
1639488106790.png (8.0 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
32.2k 40 11 19

Hello @mbh181 ,

Let us verify together a couple of items:

1. The connectivity from your test machine to DSS endpoints is open and connection can be established:

selectapi.datascope.refinitiv.com on port https=443

?

2. Your DSS environment, with correct endpoint URL and valid credentials, username and password replaced, is selected in Postman and correct URL to Datascope is replaced instead of the { {variables}}, for example, you should be seeing on Postman console something like:

post.gif

?


post.gif (13.7 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
78.2k 246 52 72

@mbh181

I assumed that you copied the JSON message from the tutorial pages.

The copied message may contain invalid characters.

I got the same error message when I used the copied message in Postman.

1639490669225.png

You need to delete all space characters in the message an try again.

1639490763949.png


1639490669225.png (50.9 KiB)
1639490763949.png (46.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 2 3 5

I now get the following error although my login works on the datascopeselect website


1639491369524.png


1639491369524.png (21.2 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
32.2k 40 11 19

Hello @mbh181 ,

Let us go over a couple of checkpoints:

Do you have the valid DSS username and password that are allocated to you?

Are you able to log into DSS GUI at https://select.datascope.refinitiv.com/ with the same username and password?

Have you replaced the valid username and password into your Postman environment, and do they get substituted in place of "dss-user" and "dss-password" placeholders and you see them passed into your authentication request as you hover over the variables?

I would like to suggest, if you have not done so, to over DSS REST REST API Tutorials Introduction, it explains the steps required to get started working with DSS from Postman and the reasoning behind the steps. The next tutorials in the same section should help understanding and running successfully the common requests you may require once you have authenticated.

I hope this information helps

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 2 3 5

Hi @zoya faberov


I confirm my access works with https://select.datascope.refinitiv.com/

credentials, as far as i can see are supplied correctly in the Postman environment.

Re: the tutorial: this is what i originally followed and where the error came up.

any other suggestions to get access?


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.