question

mostafa.elzoghbi avatar image
0 Likes"
mostafa.elzoghbi asked

GetSessionID() returns an error in sandbox

Hi, I am trying to get session id using my api after i configured it but when i call GetSessionID() in my c# code i get an error. here is my code: public string GetSessionId() { try { ApiContext context = new ApiContext(); apiContext.SoapApiServerUrl = Helper.LoadeBayConfigurations()[Constants.PK_EBAY_API_URL]; context.ApiCredential.ApiAccount.Application = Helper.LoadeBayConfigurations()[Constants.PK_EBAY_API_APP_ID]; context.ApiCredential.ApiAccount.Certificate = Helper.LoadeBayConfigurations()[Constants.PK_EBAY_API_CERT_ID]; context.ApiCredential.ApiAccount.Developer = Helper.LoadeBayConfigurations()[Constants.PK_EBAY_API_DEV_ID]; context.ApiCredential.eBayToken = Helper.LoadeBayConfigurations()[Constants.PK_EBAY_API_USER_TOKEN]; context.RuName = "MY_APP_RU_NAME"; GetSessionIDCall apiCall = new GetSessionIDCall(context); apiCall.ApiRequest.RuName = context.RuName; return apiCall.GetSessionID(context.RuName); } catch (Exception ex) { return null; } }
c#c# ebay api object errorcompany-name
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.

jourbandts avatar image
0 Likes"
jourbandts answered
I was able to make a request without issue using C#. I did mine a bit differently though, GetSessionIDCall oGetSessionIDCall = new GetSessionIDCall(oContext); //' set the Version used in the call oGetSessionIDCall.Version = oContext.Version; //' set the Site of the call oGetSessionIDCall.Site = oContext.Site; //' enable the compression feature oGetSessionIDCall.EnableCompression = true; oGetSessionIDCall.RuName = "eBay-eBay91ab0-1ca5--kxzcktk"; oGetSessionIDCall.Execute();
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.

jourbandts avatar image
0 Likes"
jourbandts answered
What error are you receiving? The specific error and error code would help.
· 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.

He replied on Twitter. > getting, error 2. GetSessionId is not > supported API call. > > I'm using ver 817. It is in the > impelentation of the sdk I'm using.
0 Likes 0 ·
mostafa.elzoghbi avatar image
0 Likes"
mostafa.elzoghbi answered
Thanks @jourbandts, this worked.
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.