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
Kunal Purohit 4Kunal Purohit 4 

How to write Apex class for retreiving projects from teamwork into salesforce

Hi, i have written below code to retreive project information from Teamwork into Salesforce. But it is not reteriving projects. Instead its showing Not Authorised...
Public class RestApp1 {
public void basicAuthCallout(){
HttpRequest request=new HttpRequest();
request.setEndpoint('https://blueflamelab1.teamwork.com/projects.json');
request.setMethod('GET');
request.setHeader('Authorization','Bearer tkn.v1_OGZhNWRhNjYtZjVhOS00ZDBhLWJhODEtODVhZTA2MTgzYTE5LTcxMjQ3Ny40MTE3NTAuVVM=');
 Http http = new Http();
 HTTPResponse res = http.send(request);
 System.debug(res.getBody());   
}
}

 
ANUTEJANUTEJ (Salesforce Developers) 
Hi Kunal,

https://trailblazer.salesforce.com/ideaView?id=08730000000DiaSAAS

Currently, there is no out of the box implementation for integrating salesforce and teamwork the above link is for an existing idea that you can upvote, and below is a link to the trailhead that describes the way to integrate the salesforce and apps through the apex, please try checking it out once.

>> https://trailhead.salesforce.com/content/learn/modules/apex_integration_services

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.