question

piligutierrez avatar image
0 Likes"
piligutierrez asked

FetchToken returns error in Sandbox "The secret Id you provided does not match with the one you provided earlier"

I am using Java SDK and when I use "FetchToken" call passing a valid session ID it returns: " com.ebay.sdk.ApiException: The secret Id you provided does not match with the one you provided earlier" This is happening in Sandbox only. In Production, it works fine and the token is returned successfully. I tried to test that call on the eBay API test tool and it's failing as well, so it's not a SDK problem. It's Sandbox environment problem. Is anyone facing this issue? Ebay developer staff, please could you have a look and fix the issue? Thank you.
sandboxfetchtoken
· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @piligutierrez, Does your sessionID contain '+' ? If so then this is a known issue with most browsers. It has been fixed in the FetchToken flow after you login into the website: https://developer.ebay.com/signin For time being, I would suggest you to please login and go through the fetch token flow in order to generate your token. Thanks
0 Likes 0 ·
shulmani_developer.support avatar image
0 Likes"
shulmani_developer.support answered
Hi, There is no issue with the Sandbox environment as I was successfully able to make the GeTSessionID and FetchToken without any issues. Can you please let us know the steps that you are following to reproduce the issue? Cheers!!!
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

corc-ches avatar image
0 Likes"
corc-ches answered
I am also facing the same issue. It works in the Production environment only. If this works in Production and Sandbox isn't, then there should be a problem in Sandbox.
· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi corc-ches, We are not able to reproduce this issue. Can you please check if the correct URL is being used: https://ebaydts.com/eBayKBDetails?KBid=429 If you are still experiencing this issue, please file a ticket. We will need more information from you to troubleshoot. Regards,
0 Likes 0 ·
corc-ches avatar image
0 Likes"
corc-ches answered
Ok, for more information, here are the request and response: Sending SOAP request to: https://api.sandbox.ebay.com/wsapi?siteid=0&callname=FetchToken&client=java&appid=[MY APP ID] Request: [MY APP ID] [MY DEV ID] [MY AUTH CERT] ReturnAll 963 High o+MCAA**5575c9901540a471d22041c0ffffd92d Response: 2016-04-27T02:04:46.890Z Failure The secret Id is invalid. The secret Id you provided does not match with the one you provided earlier. 16117 Error RequestError 949 E949_CORE_API_17895653_R1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

corc-ches avatar image
0 Likes"
corc-ches answered
I followed exactly as stated in your [documentation][1] to not include the SecretID because I have the SessionID already generated via the GetSessionID call executed prior to this. [1]: http://developer.ebay.com/Devzone/XML/docs/Reference/eBay/FetchToken.html#Request.SecretID
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jigishmehta avatar image
0 Likes"
jigishmehta answered
Hi @corc-ches, The reason why you are seeing this issue is because in your specific case, the sessionID has a '+' sign which does not get url encoded and gets replaced by blank space leading to the error you are seeing. This issue is known with most of the browsers and it has been fixed in the FetchToken flow after you login into the website: https://developer.ebay.com/signin For time being, I would suggest you to please login and go through the fetch token flow in order to generate your token. Thanks
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

corc-ches avatar image
0 Likes"
corc-ches answered
Hi @jigishmehta The SessionID is exactly the String value returned by the GetSessionID call. And how come this works in the Production environment? Codes are the same, only the URL endpoint is pointing to the production server.
· 3
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@corc-ches Can you please paste the sessionID for both the environments here? If I am not wrong, the sessionId of Production would not be having the +. Thanks
0 Likes 0 ·
That's what I'm thinking too. Anyway I'll let you know soon. Thanks for your help.
0 Likes 0 ·
GetSessionID will return the right String value. The issue occurs when you make the fetchToken call using the generated sessionID
0 Likes 0 ·
corc-ches avatar image
0 Likes"
corc-ches answered
Sandbox Environment GetSessionID request: ReturnAll 963 High [MY RUNAME] Sandbox Environment GetSessionID response: 2016-04-27T03:07:44.597Z Success 949 E949_CORE_API_17895653_R1 o+MCAA**55afca451540a471d22041c0ffffd927 I think it would be better that the SessionID generator in the Sandbox Environment should remove the +.
· 4
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@corc-ches The issue is not with the way sessionID is generated. Having a + is okay but it needs to be url encoded as most of the browsers replace it with space. Also this response is correct and you will see the error when you try to use this sessionID for fetchToken call. We will try to fix the url encoding issue but in the meanwhile, as I suggested, please login to developer.ebay.com and go through the fetchToken flow for sandbox to get your token Hopefully I was able to help you out Thanks
0 Likes 0 ·
Hi @jigishmehta Yes, thank you for your help and I appreciate your quick response. I did go through the fetchToken flow as you suggested for the meantime. But, I really would want this be fixed because in our application flow, we allow ebay users to go through the auth & sign-in process during new account registration in order for our application to get auth token of the registrant (ebay user).
0 Likes 0 ·
Your welcome. We will try to fix this and update. Meanwhile you can also file a ticket so that you can track this issue. Thanks
1 Like 1 ·
Show more comments
corc-ches avatar image
0 Likes"
corc-ches answered
By the way, I have confirmed that in the Production environment, GetSessionID does not return SessionID string value with a +.
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jigishmehta avatar image
1 Like"
jigishmehta answered
Great. Thanks for confirming @corc-ches
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

corc-ches avatar image
0 Likes"
corc-ches answered
Yes, thank you for your help and I appreciate your quick response. I did go through the fetchToken flow as you suggested for the meantime. But, I really would want this be fixed because in our application flow, we allow ebay users to go through the auth & sign-in process during new account registration in order for our application to get auth token of the registrant (ebay user).
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.