Zoho Catalyst : Request payload is empty - serverless

I created one project in catalyst and I am planning to integrate zoho creator and zoho catalyst.In catalyst project I'm using
client - web
function - Node js
From creator I'm triggering postUrl and in catalyst request payload is showing like empty object
please help me to get request payload from creator postUrl
I am attaching a screenshot for your reference
Payload is empty

Related

Google api php : Wrong audience in jwt for iOS only

I'm new and only developpeur in my company and they tasked my with clearing some bugs with their mobile app.
I'm working with an Ionic app and we have google login option for our users, using cordova plugin "cordova-plugin-googleplus".
The problem I'm having is the user tokenId I get from google doesn't work when I send it to my API using "google-api-php-client" library v1.1.5 :
- When the tokenId comes from an Android device, the connection works, the azp and aud in the token have a different value, one is the Android client ID and the other the web client id.
- When the tokenId comes from an iOS device, the connection doesn't work, the azp and aud both have the iOS client id value.
So in iOS case when google api php library checks the tokenId against the client id in my config it fails as the config give the web client id.
I have a couple questions, is it normal that the tokenId for iOS doesn't have the web client ID as the Android one ? And is possible in the config to allow more than one client ID ? (So I could allow both the web client ID and the iOS ID)
Thanks for any advice !
I found out the answer
Apparently for iOS if you don't add the option 'offline' : 'true' when calling the google login it doesn't use the webClientID you specified.
Not sure why it does that for iOS and not for Android though
It's in GooglePlus.m :
NSString* serverClientId = options[#"webClientID"];
...
if (serverClientId != nil && offline) {
signIn.serverClientID = serverClientId;
}
I'm still interested into why the different behavior for iOS and Android or if it's a bug, but hopefully this will help someone else someday

zoho creator get records from zoho project

I am using zoho creator and I need to fetch records from zoho projects using api ( like zoho.books.getRecords(...) ) to liste all tasks.
I need somtjing like this :
response1 = zoho.books.getRecords("Invoices",organization_id,"cf_no_de_projet=" + no_projet);
This URL lists all projects in a portal (JSON):
https://projectsapi.zoho.com/restapi/portal/<PORTAL_ID>/projects/?authtoken=<YOUR_AUTHTOKEN>
You can run a GET request in Creator with the same parameters.
If you don't know the Portal ID, you can get a list of all available portals:
https://projectsapi.zoho.com/restapi/portals?authtoken=<YOUR_AUTHTOKEN>
There is no Internal API for ZOHO Project. you must be used External API.
https://projectsapi.zoho.com/restapi/portal//projects/?authtoken=

My request URL is not receiving any events for the Slack Events API. What am I missing?

I want to subscribe to Slack Events API for any message posted in a slack channel. These are the following steps I took as given in Slack Event API documentations.
I created a slack app with following permission scopes :
channels:history, groups:history, im:history, mpim:history
In Event Subscriptions, I enabled events, verified Request URL ( "https://api.example.com/slack/event/push") successfully, and subscribed to the following Team Events :
channel_history_changed, group_history_changed, message.channels, message.groups, message.im, message.mpim
I made the user go through oauth authorization to install the app. The url is shown below with scope and redirect uri. (PHP Code)
$url = "https://slack.com/oauth/authorize/?client_id=" . SLACK_CLIENT_ID .
"&scope=users.profile:read,users:read,groups:history,channels:history,im:history,mpim:history" .
"&redirect_uri=" . urlencode('https://api.example.com/slack/oauth/callback') .
"&state=XXXXXXXXX";
I receive a code from slack which I exchange for access token.
Access Token: xoxp-XXXXXXXXX-XXXXXXXXX-XXXXXXX-XXXXXXXXXXXXXXXXXXXX
Scope: identify,channels:history,groups:history,im:history,mpim:history,users:read,users.profile:read
Team Id: XXXXXXXX
I checked the apps and integration of the team to see if the app was installed and yes it is in the list of Apps.
Now as per my understanding when any message is posted in any channel of the team, a POST request should be made to my verified URL ( "https://api.example.com/slack/event/push"). But I don't get any POST request there.
I thought maybe the URL is broken but I tested it with a counter and every time the URL is hit it increments the counter. So the URL is fine.
Is there a step I missed somewhere? I don't know what to try next.
I contacted Slack support and they were very helpful. The logs at slack showed that Slack was actually sending POST requests to my Request url. So my setup worked fine. But my API framework was failing to parse the request body and hence sending internal server error (500) to Slack. We figured this out by using requestb.in.
All I had to do was change the way I parsed request body.
Having the channel be public is VERY important!

How To Build an API URL using Postman Chrome extension

Currently interning in a mobile dev company.
Working on a task that they assigned to me.
Need to build an explore screen that receives JSON data.
They have their JSON data coming through Postman chrome extension.
I have authorization token and sample username/password.
As well as something that looks like a link that I can modify:
https://nameoftheapp.nameofthecompany.com/api/v1/search/surveys/app?searchCategory=explore&limit=10&offset=0&location=global
All iOS json tutorials shows that I need an API url.
How Can I build such URL?
edit:
here is what I've been given - the Postman chrome extension:
(sorry, had to hide some details because of non disclosure agreement)
Postman assist you in testing the functionality you have built into an API. These functionalities can be accessed by typing in the URL and then using the GET, POST, PUT etc HTTP requests.
I think maybe this video can assist you in learning more about Postman - Javabrains does a great job at explaining it:
http://javabrains.koushik.org/courses/javaee_jaxrs/lessons/Installing-A-Rest-Api-Client

Google API fails to authenticate when iOS client ID is used

I'm trying to integrate the Google Data API into my application. I'm using the ObjC wrapper available here:
http://code.google.com/p/gdata-objectivec-client
but I have got some issues with the authentication. Basically I'm following the steps as described here:
http://code.google.com/p/gtm-oauth2/wiki/Introduction#Signing_In_to_Google_Services
I have created a project on the API Console and added two client IDs for installed applications: one is of the "Other" platform, the other is "iOS" with the bundle ID appropriately set (though I left the appstore id 0 for the moment). Now comes the interesting part.
Both the YouTubeSample app bundled with the above wrapper library AND my iOS app work perfectly with the client ID belonging to the "Other" platform, and both of them return a 400 invalid_client error when I switch the ID for the iOS one. I have doublechecked the client IDs and secrets, all are correct. The iOS app has of course been given the correct bundle ID.
So, am I missing something trivial here?
Is there a reason that you need to use the iOS-type id/secret pair instead of the other-type pair? Perhaps I'm missing something, but the linked documentation states to not use an iOS type client id:
In the console, create a project, then click "API Access" in the left column. Create a new Client ID for an Installed Application (not a web application) type other (not iOS). This will provide Client ID and Secret strings to be used with the controller.
The controller likely doesn't identify itself as an iOS application when sending the requests, which Google probably checks when it receives an iOS id/secret pair.

Resources