(Xojo Plugin) Google Sheets Refresh an Expired Access Token

Hi @Matthew_Cottrell - I solved a similar issue for a member on this post. It seems like the same issue you may be having. If its a different path related issue then please post your debug message from the IDE?

This was my working example from that post link:
https://www.dropbox.com/s/mescuhhneadk0p9/testChilkatfile.xojo_binary_project?dl=1

This is the code:

    // MY TEST CODE TO PRODUCE A JSON RESULT
    Var jsonTestStr as String =  "{""Result"": ""OK"",""Reports"": [{""ReportTxt"": ["" "",""REPORT GROUP: DAILY REPORT""]}]}"
    Var json As New Chilkat.JsonObject
    Var success as Boolean = json.Load(jsonTestStr)
    json.EmitCompact = False

    Var fac As New Chilkat.FileAccess

    Var thisPathFolderItem as FolderItem = SpecialFolder.ApplicationData.Child("MyAzureFolder")
    If thisPathFolderItem.Exists = False Then
      thisPathFolderItem.CreateFolder()
    End If

    // SET FILENAME
    thisPathFolderItem = SpecialFolder.ApplicationData.Child("MyAzureFolder").Child("microsoftGraph.json")
    Var filePathStr as String = thisPathFolderItem.NativePath
    success = fac.WriteEntireTextFile(filePathStr,json.Emit(),"utf-8",False)
    System.DebugLog(fac.LastErrorText)
1 Like