0

I'm integerating two salesforce instences via metadata api with access token, with reference to following github project. https://github.com/financialforcedev/apex-mdapi

So i updated the createService() code as follows to retrieve the acess token as the session ID. But ended up getting mentioned error. Can someone suggest me a workaround for this?

MetadataService.MetadataPort service = new MetadataService.MetadataPort(); service.SessionHeader = new MetadataService.SessionHeader_element();

//service.SessionHeader.sessionId = UserInfo.getSessionId(); 
service.SessionHeader.sessionId = clientAccessToken;

//I tried setting following as the endpoint_x. But was getting separate error
//service.endpoint_x = 'https://login.salesforce.com';

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.