How to Test
You can use cURL commands on the command line to test connectivity and your set up.cURL software can be downloaded from here cURL.If command line isn't your preference , a great alternative is Postman, an easy-to-use Chrome extension for making requests.
To make a REST call:¶
Request access token¶
Please contact us through apiaccess@wm.com to understand the process for requesting the access to the API or if you have any other related questions.
Make an API call¶
With a valid access token and clientId, you are ready to make requests to Waste Management API.Send the access token with authentication type set as Bearer and clientId in headers like below in every API call.
Authorization: Bearer <JSON Web Token>
ClientId: <ClientId>
Tip
You can use below Authorization and ClientId to call hello-world API
The following is an example of a request made to the hello-world API:
Sample Request¶
curl -i https://apitest.wm.com/v1/helloworld \-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhbnlvbmVAYW55LmNvbSIsInN1YiI6Ildhc3RlIG1hbmFnZW1lbnQgIHRlYW0iLCJqdGkiOiIwQkQyRTVDQkM2RDE2Mzc0RkNFQSIsInNjb3BlIjpbInNlbGYiLCJoZWxsb3dvcmxkIl0sImlhdCI6MTQ5MDg5ODk1NSwiZXhwIjoxNTIyNDM0OTU1fQ.O2k-senypXFZQwW4Ln3mBg60qzOSo-diPQWVfir3m6Q" \-H "ClientId: 0BD2E5CBC6D16374FCEA" \-H "Request-Tracking-Id: 12132"
Sample Response¶
{ "request_tracking_id": "12132", "message": "Hello, Welcome to Waste Management REST API",}