OAuth2 Authentication Guide for Data as a Service

OAuth2 Authentication Guide for Data as a Service

REST Request with Token in the Header

REST Request with Token in the Header

Rather than including the access token in the URL, you can instead include it as an HTTP header. The header must be in this format, replacing the bold text with the token:
Authorization: Bearer
[token]
Unlike the authorization header used when requesting a token, this does not have to be encoded. Using a GET request with the token in the header would look like this:
GET /StrikeIron/emv6Hygiene/EMV6Hygiene/VerifyEmail?VerifyEmail.Email=user@domain.com&VerifyEmail.Timeout=5 HTTP/1.1 Host: ws.strikeiron.com Authorization: Bearer e66ce8de3d87454eb236211b4005d570
While a POST would appear like:
POST /StrikeIron/emv6Hygiene/EMV6Hygiene/VerifyEmail HTTP/1.1 Host: ws.strikeiron.com Authorization: Bearer e66ce8de3d87454eb236211b4005d570 Content-Type: application/x-www-form-urlencoded VerifyEmail.Email=user@domain.com VerifyEmail.Timeout=5
Remember that you can change the response format from XML to JSON by adding the
Format=JSON
parameter to the GET query string or in the body of the POST:
POST /StrikeIron/emv6Hygiene/EMV6Hygiene/VerifyEmail HTTP/1.1 Host: ws.strikeiron.com Authorization: Bearer e66ce8de3d87454eb236211b4005d570 Content-Type: application/x-www-form-urlencoded VerifyEmail.Email=user@domain.com VerifyEmail.Timeout=5 Format=JSON

0 COMMENTS

We’d like to hear from you!