cancel
Showing results for 
Search instead for 
Did you mean: 

Missing Token while invoking a REST API while the same works from POSTMAN

Visitor

Missing Token while invoking a REST API while the same works from POSTMAN

Hi,

 

I am invoking a REST API with a Bearer Token but always receive 'Invalid Request - Missing Token'. Though when the same token is used to invoke the REST API from POSTMAN, it works fine.

 

RAW Request:

GET https://api.adp.com/core/v1/operations/workerInformationManagement/hr.v2.workers/1421855812%5F3170?$... HTTP/1.1
Accept-Encoding: gzip,deflate
Authorization: Bearer 428a0639-d5f8-4c1d-9116-dba8937dcdf0
Host: api.adp.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_112)

 

RAW Response:

HTTP/1.1 401 Unauthorized
ADP-CorrelationID: 287a2173-66ec-413e-b64a-f1cada4ff6a0
Pragma: no-cache
Cache-Control: no-store, no-cache, private
Content-Type: application/json
Content-Length: 114
Date: Thu, 15 Jun 2017 07:51:29 GMT
Server: ADP API

{
"error":"invalid_request",
"error_description":"Missing token"
}

 

Can anyone please help?

 

Regards

Sheba

1 REPLY 1
Moderator

Re: Missing Token while invoking a REST API while the same works from POSTMAN

Hi Sheba,

 

Thank you for your post!
You need to compare raw requests from Ready! API and from Postman. To get a Raw request from Postman, you can use Fiddler: http://www.telerik.com/download/fiddler.

Did you successfully retrieved the Access token in Ready! API: https://support.smartbear.com/readyapi/docs/projects/requests/auth/types/oauth2/tutorial.html
Do you see any error about the authorization in the log?
Maybe, you need to send the access token as a query parameter: https://support.smartbear.com/readyapi/docs/projects/requests/auth/types/oauth2/advanced-options.htm...

If you still cannot resolve the issue, you can open a new support case here: https://support.smartbear.com/message/?prod=ReadyAPI and provide the Support team with the details (raw requests, screenshots, etc.).


Anastasia
Customer Care Team


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors