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.
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
+
%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,
Hope this helps and please let me know in case you have any furhter questions.
@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.