Obtain Target API access token | Community
Skip to main content
haebink90767626
September 12, 2016
Solved

Obtain Target API access token

  • September 12, 2016
  • 4 replies
  • 2230 views

I have been walking through all the steps to get the Target API access token. I am stuck at this step - https://www.adobe.io/products/usermanagement/docs/createjwt

I get the 200 status from the server, and don't see no error, but the response does not return any information related to the access key or anything. The response body is empty. Does this mean there is something wrong? 

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by haebink90767626

Hi, 

I could finally get the correct response. It seems that my previous code could get the 200 success response, but actually it didn't pass the correct parameter and got the empty body response. 

Shouldn't the response be something else other than 200 if the body is empty? 

Thanks. 

4 replies

ParitMittal
Level 10
September 13, 2016

Hi,

Can you please provide more  details in terms of the  details of json request and response and that should help us further debug.

Thanks & Regards

Parit Mittal

haebink90767626
haebink90767626AuthorAccepted solution
September 13, 2016

Hi, 

I could finally get the correct response. It seems that my previous code could get the 200 success response, but actually it didn't pass the correct parameter and got the empty body response. 

Shouldn't the response be something else other than 200 if the body is empty? 

Thanks. 

Level 2
March 7, 2017
                I am having an issue obtaining an access token using JWT too. I am getting "JWT token is incorrectly formatted, and can not be decoded" error whatever JWT token I use. Here is an example request I am doing curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'client_id=***&client_secret=***&jwt_token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.EkN-DOsnsuRjRO6BxXemmJDm3HbxrbRzXglbN2S4sOkopdU4IsDxTI8jO19W_A4K8ZPJijNLis4EZsHeY559a4DFOd50_OqgHGuERTqYZyuhtF39yxJPAjUESwxk2J5k_4zM3O-vtd1Ghyo4IbqKKSy6J9mTniYJPenn5-HIirE' "https://ims-na1.adobelogin.com/ims/exchange/jwt" client_id and client_secret are obfuscated here, but they are correct when I'm getting the error since omitting or tampering one of them will result in a "client_id/client_secret are incorrect" error instead. Concerning the jwt_token, I tried various token, I tried base64 encoding the all token, etc. It is always returning the same "JWT token is incorrectly formatted" error. In the example, I used a JWT example from https://jwt.io/#debugger, so it is correctly formatted and can be decoded. I am not sure how is supposed to be formatted the jwt_token parameter value.
October 19, 2017

Similar issue I have "got the empty body response"