MarkGalloway / wealthsimple-trade

Unofficial API docs for the Wealthsimple Trade API
MIT License
99 stars 14 forks source link

Trying to use this WS Trade API using Postman #7

Closed web-cdn closed 4 years ago

web-cdn commented 4 years ago

Thanks for sharing this awesome API guide. I am trying to use this API using postman. I was able to Authenticate by posting my credentials via POST Body and extract access token and refresh token.

But I am not sure how to pass these as Authorization header for subsequent requests.

I tried this and it still returned Not Authorized error. Authorization: { X-Access-Token 000000000000 X-Refresh-Token 00000000000 }

Can you please share an example on how to pass on Authorization on a GET request.

vlad-pisanov commented 4 years ago

@web-cdn they use bearer authentication. In simple terms, you have to pass in this header:

{ Authorization: "Bearer <your access token>"}

for every future REST call.

Check out this implementation, it covers most of the API endpoints and how to use them: https://github.com/ahmedsakr/wstrade-api

web-cdn commented 4 years ago

Thanks @vlad-pisanov Authorization: "Bearer " worked like a charm.