Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

You tube Upload Video

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    You tube Upload Video

    I was just looking at the API javascript sample on this page: https://developers.google.com/youtub...nsert#examples
    Has anyone done this?
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

    #2
    I'm looking into this now. Have you found anything out yet?

    Comment


      #3
      No but if I were doing this today - I would no doubt use the CURL method. https://developers.google.com/youtub...=true#examples
      Should be able to figure out what you would need from there unless you've never attempted to use CURL in AA - I will say this, I am STILL a very simple xbasic programmer or code writer and I was able to get some things working here and there over time and with many long hours of "why isn't it working" BUT I was able to figure things out!
      NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

      Comment


        #4
        I haven't tried uploading to youtube, but I absolutely use the api to download.
        Gregg
        https://paiza.io is a great site to test and share sql code

        Comment


          #5
          Do you know about the Import Google Service tool in the REST genie?????????

          youtubeapi.png
          Sarah Mitchell
          Director of Customer Success | [URL="https://www.alphasoftware.com"]Alpha Software Corporation[/URL]
          [B]Get in the know! [/B] Join us for our Weekly Webinars: [URL="https://www.alphasoftware.com/weekly-transform-tuesday-webinar"]TransForm Tuesday[/URL] and [URL="https://www.alphasoftware.com/weekly-alpha-anywhere-overview-webinar"]Wednesday's Alpha Anywhere Demo and Q&A[/URL]
          Connect with us: [URL="https://www.instagram.com/alpha_software_corp/"]Instagram[/URL] | [URL="https://twitter.com/AlphaSoftware"]Twitter[/URL] | [URL="https://www.facebook.com/AlphaSoftware/"]Facebook[/URL] | [URL="https://www.linkedin.com/company/alpha-software"]LinkedIn[/URL] | [URL="https://www.youtube.com/user/AlphaSoftwareInc"]YouTube[/URL]

          Comment


            #6
            You guys are awesome sarah!
            NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

            Comment


              #7
              Looks like this is my next project. I'll be looking into REST APIs now.

              Comment


                #8
                Originally posted by Russell Craycraft View Post
                Looks like this is my next project. I'll be looking into REST APIs now.
                Recommend. I've used the YouTube API for a lot of internal projects here at Alpha.
                Sarah Mitchell
                Director of Customer Success | [URL="https://www.alphasoftware.com"]Alpha Software Corporation[/URL]
                [B]Get in the know! [/B] Join us for our Weekly Webinars: [URL="https://www.alphasoftware.com/weekly-transform-tuesday-webinar"]TransForm Tuesday[/URL] and [URL="https://www.alphasoftware.com/weekly-alpha-anywhere-overview-webinar"]Wednesday's Alpha Anywhere Demo and Q&A[/URL]
                Connect with us: [URL="https://www.instagram.com/alpha_software_corp/"]Instagram[/URL] | [URL="https://twitter.com/AlphaSoftware"]Twitter[/URL] | [URL="https://www.facebook.com/AlphaSoftware/"]Facebook[/URL] | [URL="https://www.linkedin.com/company/alpha-software"]LinkedIn[/URL] | [URL="https://www.youtube.com/user/AlphaSoftwareInc"]YouTube[/URL]

                Comment


                  #9
                  Someone wrote into support about this and I have a partial write-up on some of the critical things you need to do but never got this into doc, so I'm posting the email I just sent to that individual here, expanded with excessive details in a few places, and a better link to the Google Scopes info.

                  How to Setup YouTube API v3 in Alpha Anywhere

                  1. Create the YouTube Web Service

                  Create a new Web Service to consume a REST service:
                  1. On the Web Projects Control Panel. select "Web Services" in the left-hand panel
                  2. Click "New' in the toolbar
                  3. Click "Create a new definition to consume a REST service" when prompted
                  4. When the Create REST Reference dialog appears, click the "Import Google Service..." link.
                  5. Select the "youtube/v3" option from the list of Google Services. Then click Generate.
                  6. Name the service and click Create
                  youtube1.png






                  2. Authorize the YouTube API in Google Cloud Console

                  Next, you will need to create a project in the Google Cloud console to authorize access to the YouTube API:

                  Enable the API
                  1. Go to console.developers.google.com
                  2. Add the YouTube API from the dashboard using the "Enable APIs and Services" button
                  3. Add the YouTube Data API V3

                  Create an OAuth Credential
                  1. Go to console.developers.google.com
                  2. Go to Credential
                  3. Click the "Create credentials" button and select "OAuth Client ID"
                  4. Add an Authorized redirect URI for your local development machine:

                  Code:
                  http://localhost:DEVELOPMENT_SERVER_PORT/__a5ExternalAuthentication.a5w
                  Replace "DEVELOPMENT_SERVER_PORT" with the Server Port used by the development server. You can find this port number under the "Web" > "Development Server" menu in Alpha Anywhere.

                  Example:
                  Code:
                  http://localhost:9240/__a5ExternalAuthentication.a5w
                  If you are testing using your Machine name (the name of your Windows computer), then replace localhost with your machine name.

                  Example:
                  Code:
                  http://USER2019:9240/__a5ExternalAuthentication.a5w
                  If the URL is a public IP address, the URL must use https:// and must also include a protocol (e.g., .com, .org, etc) Example:
                  Code:
                  https://www.example.com/__a5ExternalAuthentication.a5w
                  3. Create a Named Resource Provider

                  Next, you will need to setup a Named Resource Provider for Google in Alpha Anywhere. Select Tools > Named Providers. Add a Google (OAuth) provider. Enter the required information: youtube2.png






                  You will need to define the test redirect URL. The test redirect URL will look something like this: image.png





                  If you're unsure what the URLs should be, skip ahead to testing your app in Live Test or publish to Localhost. Everything before __a5ExternalAuthentication.a5w will be identical to everything before an .a5w page published to the Development Server or running in Live Test

                  This resource will need you to add the required Access Scopes for using the YouTube API. You can find required scopes for various Google APIs here: https://developers.google.com/identi.../oauth2/scopes

                  You only need the scopes for the parts of the API you are using.

                  Also -- I neglected to mention this -- you may want to check "Application Level Token" if you want to use the Named Resource for the whole appliaction. I did this on my internal YouTube project here at Alpha. Your mileage will vary.

                  4. With all of the above in place, you're ready to test calling the API. Google blocks OAuth requests run in Emulated Browser environments. This includes Live and Working Preview. You will need test this using Live Test or publish to localhost.

                  You can use the Rest Reference Genie to insert the Xbasic to call the API endpoint you want to use. youtube4.png





                  The Xbasic will include a placeholder where you need to specify your Named Resource for Google. For Example, this is the Xbasic generated for making a call to the playlistItems list endpoint. Note the line defining the namedresource variable. This is where you specify the name of the Named Resource created in step 3 above.

                  Code:
                  dim obj as RESTReferences::YouTube::playlistItems
                  dim args as p
                  dim args.part as c
                  'dim args.onBehalfOfContentOwner as c
                  'dim args.maxResults as n
                  'dim args.id as c
                  'dim args.videoId as c
                  'dim args.playlistId as c
                  'dim args.pageToken as c
                  
                  [B]dim namedresource as c = ""
                  dim result as l = obj.list(namedresource,args)[/B]
                  
                  if result then
                  showvar( obj.result )
                  else
                  ui_msg_box("error",obj.error)
                  end if
                  ​This code will need to be adapted to work in an Ajax Callback (showvar() and ui_msg_box() are desktop only functions and cannot be used in a web application)

                  For your reference, this is an Ajax Callback I created in an internal project to download a Channel Listing from YouTube and dump it in the console:

                  Code:
                  function getChanneListing as c (e as p)
                  
                      dim channels as RESTReferences::YouTube::channels
                  
                      dim args as p
                      dim args.part as c = "snippet,contentDetails,statistics"
                      dim args.id as c = "YOUR_CHANNEL_ID_HERE_GOODLUCK"
                  
                      dim provider as c = "Google" ' Authorized previously using Get Application Level OAuth Access Token From Resource Provider action javascript
                      channels.generate_curl = .t.
                  
                      dim result as L = channels.list(provider,args)
                  
                      getChanneListing = "console.log('" + js_escape(json_generate(channels)) + "');"
                  
                  end function
                  ​


                  And, FINALLY, something I didn't mention in my email *cough*Russell*cough*, How do you authorize your token for a Named Resource? Action Javascript! Use the Get Access Token from Resource Provider ("Application Level Token" is not checked) or Get Application Level OAuth Access Token From Resource Provider ("Application Level Token" is checked) action to authorize your Named Resource used for your YouTube API calls. I tossed this on a button that I displayed first thing on the app I built for an internal project. Click the button, authorize access, and you're ready to roll.
                  Last edited by Sarah Mitchell; 09-27-2022, 03:51 PM. Reason: removing URLs that are NOT URLs
                  Sarah Mitchell
                  Director of Customer Success | [URL="https://www.alphasoftware.com"]Alpha Software Corporation[/URL]
                  [B]Get in the know! [/B] Join us for our Weekly Webinars: [URL="https://www.alphasoftware.com/weekly-transform-tuesday-webinar"]TransForm Tuesday[/URL] and [URL="https://www.alphasoftware.com/weekly-alpha-anywhere-overview-webinar"]Wednesday's Alpha Anywhere Demo and Q&A[/URL]
                  Connect with us: [URL="https://www.instagram.com/alpha_software_corp/"]Instagram[/URL] | [URL="https://twitter.com/AlphaSoftware"]Twitter[/URL] | [URL="https://www.facebook.com/AlphaSoftware/"]Facebook[/URL] | [URL="https://www.linkedin.com/company/alpha-software"]LinkedIn[/URL] | [URL="https://www.youtube.com/user/AlphaSoftwareInc"]YouTube[/URL]

                  Comment


                    #10
                    Excellent Sarah! Kudos
                    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                    Comment


                      #11
                      I always forget steps in this process. There is one final thing you have to do to make this all work. You have to create a Google OAuth Consent Screen. If you joined us in yesterday's webinar, I rambled on about all of the above but forgot this part. I got blocked by Google when I attempted to select the account where we keep our AA videos -- it was because I didn't make the consent screen. Had I made one for "Internal", it would have let me in. :D
                      Sarah Mitchell
                      Director of Customer Success | [URL="https://www.alphasoftware.com"]Alpha Software Corporation[/URL]
                      [B]Get in the know! [/B] Join us for our Weekly Webinars: [URL="https://www.alphasoftware.com/weekly-transform-tuesday-webinar"]TransForm Tuesday[/URL] and [URL="https://www.alphasoftware.com/weekly-alpha-anywhere-overview-webinar"]Wednesday's Alpha Anywhere Demo and Q&A[/URL]
                      Connect with us: [URL="https://www.instagram.com/alpha_software_corp/"]Instagram[/URL] | [URL="https://twitter.com/AlphaSoftware"]Twitter[/URL] | [URL="https://www.facebook.com/AlphaSoftware/"]Facebook[/URL] | [URL="https://www.linkedin.com/company/alpha-software"]LinkedIn[/URL] | [URL="https://www.youtube.com/user/AlphaSoftwareInc"]YouTube[/URL]

                      Comment


                        #12
                        Has anyone managed to do basic api that is not linked to social media? I am trying to use openemr api which I have tested in postman but do not know how to use in alpha. I tried creating a named resource provider but was struggling.
                        thank you

                        Comment


                          #13
                          As far as I know, you will not be able to parse any php with the alpha server
                          NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                          Comment


                            #14
                            Originally posted by CharlesParker View Post
                            As far as I know, you will not be able to parse any php with the alpha server
                            Actually, you can.

                            Comment


                              #15
                              Please elaborate...I did not know that, my recollection was it cannot serve up php pages
                              NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                              Comment

                              Working...
                              X