I am new to Moodle, but I am setup site in local server. Created new courses, users into it. I want to enroll a patient to a specific course (created using admin side) through Javascript API. Are any options to enroll a user in a course. I couldn't find any Apis for enroll section
Javascript API ? moodle uses PHP API and has also WebService API.
See this nice ws example : Using MOODLE create users and enroll them in courses via SQL
You could also call the WebService API via JS..
Related
I am trying to get information about a customer using the REST API of Shopware 6 (using this API). Therefor I need a ContextToken for that user. The only way to get a context token for a user is to log him in, but for that I need the password of a user which I do not have. Is there any way to get the ContextToken of a user with only his email address or hist customer id?
Shopware comes with 2 different APIs, the Store-API and the Admin-API. Refer to the docs.
The Store-API is there to build a storefront and thus you need to authenticate as the user using that API.
When you build custom integrations you should use the Admin-API, as that API can be used for CRUD-like operations on all entities of the system. For the admin API you can generate an API-Token and use it to query data of all customers.
I'm currently using the Facebook Business Manager API to automatically create new Child Business Managers using the 2-tier Business Manager solution.
https://developers.facebook.com/docs/marketing-api/2tier-bm-solution
The only steps I am unable to find documentation for are adding a domain and exporting the DNS txt record for verification. https://developers.facebook.com/docs/sharing/domain-verification/verifying-your-domain/
Has anyone accomplished this using the API?
Confirmed by Facebook Engineering support that this endpoint doesn't exist (yet).
I am currently writing a web shop application, whose backend will be host at Parse SDK.
I want to add a funcitonality to my app, that if i get an API request to the server to create a new listing.
The API will be called from other apps(I want them to inttegrate it in their system, so if they make a new listing on their personal site, than it will create a new listing on my site too by calling that api).
I want to know if this is possible, I need authentication too, and I want to know if it is possible without providing them my DB application id and rest api key.
This is my first time working with Office 365 APIs. What we wanted to achieve is to retrieve users email from Office 365 and display the content in our Java Web Application.
Few thinks I looked through:
It is recommended not to use basic authentication but rather OAuth or OpenId
Rest API is the standard.
Should we register our application in to Azure AD ? Do we have to use for every new user or is it only a one time setup ?
I would really appreciate it if you point me to any sample source code to refer too. Feel free to suggest me any recommendations.
Should we register our application in to Azure AD ? Do we have to use for every new user or is it only a one time setup ?
Yes you must register your application to use OAuth, which is required by the REST API. I recommend you register in the Application Registration Portal at http://apps.dev.microsoft.com/. You can login to the ARP with an Office 365 account OR a Microsoft account. This allows you to use the Azure "v2" OAuth model, and to access Outlook.com accounts in addition to Office 365.
Registration is a one-time thing, assuming you want to make your web application multi-tenant.
There's a walkthrough for Java/Spring web app here: https://dev.outlook.com/restapi/tutorial/java
Finished source code here: https://github.com/jasonjoh/java-tutorial
My Situation:
I'm trying to populate a shared Google Calendar when an event is created on the Salesforce interface. Im currently using the latest Google Calendar v3 (RESTful) API for the same https://developers.google.com/google-apps/calendar/ with APEX my development language.
I'm using a trigger that catches all the value from the fields (trigger.new) and passing those values to a class that does the JSON serialization, authentication and API call.
Till now, I was able to get all the data from the object and pass is to the class and get it serialized. But I need to do the OAuth 2.0 call before I can make a Google Calendar API call. https://developers.google.com/google-apps/calendar/
I have setup my application on the Google API Console and obtained the Client ID, Client Secret etc.
The usual way OAuth 2.0 works is that an authentication page pops-up waiting for the user to grant access to the API so that it can access the calendars linked to the users account.
My question:
Is there any way I can get the OAuth done in the background using a static/private key which is either obtained by granting access just once but not every time or just programmatically using the key value in the class to authenticate the user.
Looking forward to getting useful suggestions/inputs/help from everyone.
If the user --once-- have made the authorization you got the access_code and the refresh_code.
I found it helpful to store both codes with the application (here Firefox and password manager). With the next start of the application (Firefox/extension) I use the refresh_code to request a new access_code. That is used during the session for any further calendar call.