Credly API get SDK builder temp_token using ColdFusion

247 views Asked by At

I am trying to get temp_token for credly API's badge builder SDK. I am using ColdFusion as server side language. My code look like,

    <cfhttp method=”post” result=”objGet” 
              url=”https://developers.credly.com/badge-builder/code” >
        <cfhttpparam type=”formfield” name=”access_token” value=”my_access_token” />
    </cfhttp>

As well as, I have tried

    <cfhttp method=”post” result=”objGet” 
              url=”https://developers.credly.com/badge-builder/code” >
        <cfhttpparam type="header" name="Authorization" value="access_token=(my_access_token)” />
    </cfhttp>


    <cfhttp method=”post” result=”objGet” 
              url=”https://developers.credly.com/badge-builder/code” >
        <cfhttpparam type="header" name="access_token" value="(my_access_token)” />
    </cfhttp>


    <cfhttp method=”post” result=”objGet” 
              url=”https://developers.credly.com/badge-builder/code” >
        <cfhttpparam type="header" name="access_token" value="my_access_token” />
    </cfhttp>

All of them are giving me response as,

{ 
  “success”:false,
  ”error”:”You must pass an access_token to retrieve a badge builder embed code”
}

Am I missing something?

Update: I have checked their official wordpress plugin, they are using type as body. I have tried that too, but gave the same result.

0

There are 0 answers