0

I m getting token now.

http://IP:5280/oauth/authorization_token?response_type=token&client_id=armsprime&redirect_uri=http://www.razrcorp.com/&scope=get_roster+connected_users+sasl_auth

http://www.redirectdomain.com/?access_token=CZ750oz9yPWLvI9p0k5fDlzFfJP4Iu9m&token_type=bearer&expires_in=31536000&scope=get_roster%20connected_users%20sasl_auth&state

But now if try to access using postman

Api url: http://ipaddress:5280/api/get_roster

Header: Content-Type:application/json Authorization:Bearer reJqgKFPCyM1OcFmy8XrK9YdRh2UdYxV //X-Admin:true

Body: { }

Response: 400 Bad Request

Can someone please help me out. Thanks in advance.

Sanjay Sahu
  • 43
  • 2
  • 7

1 Answers1

0

From the documentation, this API call requires a post with user and server as parameters in JSON.

Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
  • Yes Mickael i doing the same. Please verify if i m missing something. – Sanjay Sahu Apr 10 '18 at 07:02
  • Request eg: curl -v -X POST -H "Authorization: Bearer pyywX4LeUXRI86zWp5oxL3UKMaMKnGLj" http://IP:5280/api/get_roster -d '[]' – Sanjay Sahu Apr 10 '18 at 07:08
  • Response Eg: Trying IP.... TCP_NODELAY set Connected to IP (IP) port 5280 (#0) POST /api/get_roster HTTP/1.1 Host: IP:5280 User-Agent: curl/7.54.0 Accept: */* Authorization: Bearer pyywX4LeUXRI86zWp5oxL3UKMaMKnGLj Content-Length: 2 Content-Type: application/x-www-form-urlencoded * upload completely sent off: 2 out of 2 bytes HTTP/1.1 400 Bad Request Content-Length: 168 Content-Type: text/xml; charset=utf-8 Access-Control-Allow-Origin: * Access-Control-Allow-Headers: Content-Type *Connection #0 to host IP left intact

    400 Bad Request

    %
    – Sanjay Sahu Apr 10 '18 at 07:09
  • your data are empty (see -d). You are not posting the needed parameters. – Mickaël Rémond Apr 12 '18 at 07:45