Jump to content

MLaya

Members
  • Content Count

    3
  • Joined

  • Last visited

Everything posted by MLaya

  1. Hello! I was wondering if anyone had any trouble when refreshing their access tokens? I successfully authenticated my users through RESTful API, but now have trouble using the POST call advised from the how to guide on the website. Any feedback is greatly appreciated!
  2. Hello! I am using the HTTP basic authentication method for my mobile app and have followed the POST request as outlined on the website. My ajax call is as follows: $(document).ready (function () { $('button').click(function () { var Client_ID = $('clientid').val(); var Client_Secret = $('clientsecret').val(); $.ajax ({ type: 'POST', url: 'Token endpoint', data: 'grant_type=client_credentials', headers: { 'Authorization' : 'Basic Q2xpZW50X0lEOkNsaWVudF9TZWNyZXQ='
  3. Hellow everyone, I have implemented a sign in form an button in html: <ons-button onclick="login()">Sign in</ons-button> The following Javascript is as follows: var token_ var userName = "clientID"; var passWord = "secretKey"; // app clientSecret var caspioTokenUrl = "https://xxx123.caspio.com/oauth/token"; var request = new XMLHttpRequest(); function getToken(url, clientID, clientSecret) { var key; request.open("POST", url, true); request.setRequestHeader("Content-type", "application/json"); request.send("grant_type=client_credent
×
×
  • Create New...