Forum Discussion

Sheba's avatar
Sheba
Visitor
7 years ago

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?$select=processingResult&$filter=resourceSetID%20eq%20Worker%5FAsync%5FG38J84RSPF4WVFJZ%5FG51YJG6C2KF9EZHB%5F1421855812%5F3170&$skip=1&$top=132 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