question

Upvotes
Accepted
1 0 0 0

403 Error on POSTMAN via DSWS

Please advise on the client issue regarding 403 Forbidden error in Postman. Using Postman with the GET URL for token below, we are able to generate the token.

https://product.datastream.com/dswsclient/V1/DSService.svc/rest/Token?username= &password= &props={PROPS}format={FORMAT}


Using https://product.datastream.com/dswsclient/V1/DSService.svc/rest/Data?token={TOKEN}&instrument={INSTRUMENT}&datatypes={DATATYPES}&datekind={DATEKIND}&start={START}&end={END}&freq={FREQ}&props={PROPS}&format={FORMAT}

To run the request with the generated token however gives us the 403 Forbidden error.

1683897017490.png

#technology#producterror-403
1683897017490.png (126.8 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.

@Marie Veronica

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

Upvote
Accepted
14.2k 30 5 10

Hi @Marie Veronica ,

It's because the token is included in the URL and there's some decoding on the URL itself. For example, the + character has a special meaning in [the query segment of] a URL, it means whitespace: . If you want to use the literal + sign there, you need to URL encode it to %2b

However, I'd suggest you put the token in the request body to prevent this kind of error, the format of request can be found using the DSWS client Test Rest API

For example,

1684128325332.png

Hope this helps and please let me know in case you have any furhter questions.


1684128325332.png (61.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
78.9k 250 52 74

@Marie Veronica

In Postman, you can select the token and then choose the Encode URI Component to encode the token. It will use HTML URL Encoding to encode the token.1684130200886.png


1684130200886.png (49.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.

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.