function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
buggs sfdcbuggs sfdc 

pass token in the body of request

HI,

Can we pass the token in JSON body request?

Thanks
@GM@GM
Hi,

you should pass the token in the header of request.

Header format :
Authorization : Bearer <token>

are you uising Oauth2.0 login mechanism ? which login flow is been implemented?

Regards,
GM
buggs sfdcbuggs sfdc
GM,

Am not using Oauth2.0 login mechanism,am sending response from my system setting up remote site settings and endpoint & token,it worked fine for previous endpoints, but now we just changed the endpoint and token,so am getting an error saying "inernal server error" with status "Bad server response" ,Staus "502"
string endPoint ='endpoint';
string xapiKey = 'token';