Is posible to create user and link user to existsing application using vonage-php-sdk-core package?
https://github.com/Vonage/vonage-php-sdk-core
i can make application and user with Vonage CLI, but i need to make it with PHP. is there a way?
nexmo app:create "My Sample App" --capabilities=voice,rtc --voice-answer-url=https://example.com/webhooks/answer --voice-event-url=https://example.com/webhooks/event --rtc-event-url=https://example.com/webhooks/rtc --keyfile=private.key
with vonage-php-sdk-core i can make application as well, but seems like i can't find method to create user.
The Conversation API (which encompasses Users, Members, and Conversations) isn't supported in the PHP SDK at the moment since the API is still in beta. Once that API goes fully live we will support it in SDKs other than the NodeJS SDK.
There are some vestiges of the Conversation and User APIs in the SDK, but we've marked them as deprecated since it's an older version of the API.
For the moment you should access the APIs using Guzzle or whatever HTTP client you are using (if you aren't specifying one, we should be pulling in Guzzle from Laravel).
As for working directly with the API, https://developer.nexmo.com/conversation/overview is the entrypoint for the Conversations API. General API documentation is available at https://developer.nexmo.com/api/conversation, and demo code from cURL, which can be useful for seeing URL structures as well as payloads, is available at https://developer.nexmo.com/conversation/code-snippets/user/create-user/curl.
Why don't we support this API?
As a rule we don't add support in our stable SDKs for beta APIs, as that could lead to a lot of major releases with breaking changes, as the beta APIs only have a 6 month stability SLA and can change rapidly. We are looking at better ways to handle our beta APIs (the PHP SDK now supports a module system as of v2.2.0) so that devs can get access to these types of APIs quicker.
Related
We have been developing a multi platform project which will eventually have an Android app, an iOS app and a web application. We are impressed with the features offered by Google Firebase therefore trying to leverage the opportunities.
Since our product is a multitenant software-as-a-service application we have custom authentication requirements. Therefore we followed the custom authentication implementation path of Firebase and it is functional now.
Our mobile clients send login requests to our API server,
Our API server issues customTokens and reponds them back to the clients,
Clients call signInWithCustomToken(customToken) method to sign in to Firebase.
So far so good.
What the issue is, our backend is in PHP and Firebase doesn't have an official Admin SDK for PHP. Yes, there is a package called kreait/firebase-php on Composer however it is far away from covering all of the Auth Admin SDK features. For example, there is a documented disable-user feature which is available on Firebase Admin SDK, however that operation is not implemented on the kreait/firebase-php package.
On the other hand Firebase has a Auth Rest API which just works with the API KEY. However, (I suppose ) it is designed to work on the client side therefore it just has operations for the authenticated user.
Our API server is already hosted on Google Compute Cloud and has the maximum set of access permissions on the Google Cloud services.
We have the Firebase service account file to work with the Firebase Auth services.
What we need is to consume all available Firebase Admin SDK features (possibly via Rest). For example, we would like to call revokeRefreshToken(uid) when a user changes his/her password on one of his/her devices.
Since at this specific issue there isn't any documentation, what would you advise us to do?
Update (25 January 2018)
The above mentioned missing endpoints on the Firebase unofficial PHP Admin SDK are now implemented by the maintainer after a productive discussion on a Github issue. However, I would like keep this question open since the nature of the question is asking for ideas for further collaboration and discussion.
Maintainer of said unofficial PHP SDK here :). You already have updated your original post to include that the SDK now supports the features that were missing.
I am posting this as a dedicated answer to be visible to people arriving here and searching for answers as well.
Although the Admin SDK for PHP is still not feature complete, we are getting there. I added feature matrix to the README of the Github project so that you can quickly see what is available and what isn't.
Going forward, I will implement new features by either implementing things similarly to the official Admin SDKs (especially https://github.com/firebase/firebase-admin-node) and by using the existing libraries provided by the Google Cloud Platform Library.
At some point in the future, Google will certainly provide all the necessary building blocks to use Firebase efficiently with PHP, but until then, I am happy about every happy PHP developer using my library :).
FYI: I just released a new version (4.1.0) which includes support for Firebase Cloud Storage and did in fact use the google/cloud-storage for that.
I think you can use the Identity Toolkit libraries provided by Google. Here's the one for PHP: https://github.com/google/identity-toolkit-php-client
I'm having a bit of trouble figuring out how to properly proceed making calls using the Intuit QuickBooks Online API v3. I've looked at the API Explorer, and from my understanding, I can send and receive JSON.
They also provide information about the base URL, the entity, etc: https://developer.intuit.com/docs/api/accounting/Customer
So I'm wondering, am I supposed to be using the QuickBooks SDK that they mention to download? https://developer.intuit.com/docs/0100_accounting
Or would I be able to utilize their API using something like cURL? I don't want to reinvent the wheel of course, but with all the information they provide and no reference to the SDK itself, that's where I started to get a little confused. They basically tell you how to make the calls, but don't reference the SDK in those documents.
Just to provide some extra information, I'm using PHP 5.5 and Laravel.
So I'm wondering, am I supposed to be using the QuickBooks SDK that they mention to download?
If you want to, sure.
Or would I be able to utilize their API using something like cURL?
Again, if you want to, sure. Just be aware that if you use cURL, you'll have to do some OAuth signing of your requests (see the OAuth spec) or find an OAuth lib too.
Here's another open-source alternative if you need something with more examples (disclaimer: I'm the author):
https://github.com/consolibyte/quickbooks-php
Examples:
https://github.com/consolibyte/quickbooks-php/tree/master/docs/partner_platform/example_app_ipp_v3
I have a basic Android app setup which registers itself to recieve push notifications through google.
I get the key and I store it which I can then use to manually add the device as an endpoint in the AWS control panel.
Now I would like to do the manual step in the background so I lookup the documentation and come to this: http://docs.aws.amazon.com/AWSSDKforPHP/latest/#m=AmazonSNS/subscribe
It looks like this requires the user to verify they want to be on the list but this is something to worry about later.
However, I can't make it work.
If I choose https as the protocol I get "Invalid parameter: Endpoint must match the specified protocol" which I am guessing means that the string I get back from Google isn't what it wants. I don't understand this because it works if I put it in manually. I have tried the sqs protocol but I suspect that I am trying the wrong method entirely - I just can't see another method that the API supplies that would do what I need.
I find the AWS documentation a bit rubbish (although I am aware it's an outdated API) and the their forums are nowhere near as proactive as the people on here. :)
I answered this question on the AWS PHP Development forum:
SNS push notifications is a newer feature and is not a part of version 1 of the SDK. You should consider upgrading or seeing if it's feasible to use version 2 of the SDK side-by-side with version 1.
I have an idea that you could try, but I haven't tested it myself, so I'm not sure if it will work. Try setting the $protocol parameter to "application" as described in the version 2 API docs for subscribe(). Then set the $endpoint parameter to the "EndpointArn of a mobile app and device". Since the API version of the Amazon SNS service hasn't changed from version 1 of the SDK to version 2, there is a good chance that this might work.
I want to start developing a tool that runs daily via cron for getting daily analytical data from one channel, or video, etc.. through the "Youtube Analytics API". And not what is the best way to approach it.
I have read the documentation of Google and and I have several questions:
I created the project in the console (https://code.google.com/apis/console/) but I doubt what kind of application I have to choose when I create a Client ID (Web Application, Service Account or Installed aplplication).
What PHP library use?
It's a very new API and not much information.
In the Google GData site there is a warning about that "Most newer Google APIs Google Data APIs are not Google Data APIs." and in the google-api-php-client, no examples of this API.
What is the best method for authentication in a cron?
As you can see I am very confuse, can someone help me, please?
Thank you.
1) It will be an installed application unless you will run it in a web server.
2) Use the official library, add the ytanalytics php library. Samples: https://github.com/youtube/yt-samples-php
3) You can do so by getting a refresh token from OAuth2 Playground and setting it in your youtube object.
Here it explains a little more.
And a step by step video.
We're planning a new project which will feature an API available to customers to interact with our app from their own web sites and systems. However never having built anything close to an full-fledged API in the past, I am not aware of any standards or recommendations that are available and could be used to make the API more easily adapted by our customers.
We will build the API using PHP and some parts of the API will need authentication while others don't. As of today, I have read a little about Oauth, SOAP & REST, but I have no idea on what is good practiec.
What technology/standard is recommended to base an API for 2011+ upon?
There are a number of options, but I would suggest that you may find publishing a SOAP API from PHP quite tricky to maintain.
The reason for this is that there is no inherent WSDL generation within PHP, so you'll either have to roll your own (and modify it each time), or experiment with one of the 3rd party tools - none of which I have found particularly satisfactory in the past.
I would suggest that a more straightfoward method for implementing an API in PHP would be to go down the RESTful route.
I would check out the choices made by successful APIs that are available through sites like Mashery or Programmable Web. By focusing on the successful API patterns before choosing a technology you will have a better chance that the API will work and be successful.