Forum Discussion

Suchith's avatar
7 years ago

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  - You need to authorize using session key for accessing API V1.

     

    This call will return session key which you can use while accessing API V1.

     

    https://yourcommunity.com/restapi/vc/authentication/sessions/login?user.login=<login>&user.password=<password>

     

    Pass the session key generated by the first call on restapi.session_key parameter.

    https://yourcommunity.com/restapi/vc/users/login/SuzieH/id?restapi.session_key=QItJhuKf3qhcLD8XYqmTncZrcBbWhcW_c9xd76H2Cgs.

     

     

    Here is the documentation https://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=sessionauth

    • Suchith's avatar
      Suchith
      Ace

      Hi TariqGrazitti,

      Thanks for the reply, but my question is how to make Rest call using OAuth Access Token.

      In documentation they have mentioned OAuth will support both Community API V1 and Community API V2 call.

       

      I can successful make API V1 call using session key, but i want to know how it can be achieved using OAuth Access token.

      Thanks,

      Suchith