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
mahesh p 12mahesh p 12 

Salesforce Twitter - Non-200 response code during CRC GET request (i.e. 404, 500, etc)

I have created a Apex Rest Service and enabled the Respective Apex Class under Public Access settings of a Remote site.When i hit this API of twitter with OAuth1 Authorisation
https://api.twitter.com/1.1/account_activity/all/:ENV_NAME/webhooks.json?url=https://{Salesforce_Domain}.com/services/apexrest/{urlMapping}
I am getting the below Error Response
"Non-200 response code during CRC GET request (i.e. 404, 500, etc)"
and i m getting this error while using apex REST services
"METHOD_NOT_ALLOWED errorCode: METHOD_NOT_ALLOWED message: HTTP Method 'POST' not allowed. Allowed are HEAD,GET".
Please help me in registering web hook between twitter and salesforce.
User-added image
ayu sharma devayu sharma dev
Hello Mahesh

Have you tried calling you Rest service in Workbench? If not then please do. Use this URL
 
https://yourDomain.com/services/apexrest/SFTwitter

Let me know the results so we can proceed to the next step.

Thanks
Ayush
mahesh p 12mahesh p 12
When i tried it using workbench by making a POST Call it says "Must include a Request Body." But when i use it in browser it says Errors>
<Error>
<errorCode>METHOD_NOT_ALLOWED</errorCode>
<message>HTTP Method 'GET' not allowed. Allowed are POST</message>
</Error>
</Errors>
when i hit it in post man it gives me EncodingUtil.base64Encode(data).
What to do futher.