How to Make REST API V1 Call using OAuth Access Token.
Hello,
I need help to perform REST API V1 call using OAuth Access Token. I referred https://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv1&page=apicall#constructingTheUrl and https://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=oauth2, but unable to find the solution.
I followed the example given in Community API V1 Documentation URL format with OAuth and got an error.
Please let me know.
Thanks,
Suchith
Suchith -
I assume you already have received the access token using OAuth flow as mentioned here https://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=oauth2#authorize
For API v1 you need to send request headers as below.
client-id: <your-client-id>
authorization: Bearer <access token>
Content-Type: application/jsonThe URL will look like below.
https://api.lithium.com/community/v1/<tenant_id>/users
Example call to get posts
https://api.stage.lithium.com/community/v1/<tenant_id>/posts