Cloudflare API: unknown rate limit for creating for mass zone creation via API - api

Tried to create 400 new zones on Cloudflare via its API, like this:
curl -X POST "https://api.cloudflare.com/client/v4/zones" \ -H "X-Auth-Email: user#example.com" \ -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \ -H "Content-Type: application/json" \ --data '{"name":"example.com","account":{"id":"01a7362d577a6c3019a474fd6f485823"},"type":"full"}'
Managed to add 172 successfully, then got an error 1117:
Error screenshot
Does anyone know the maximum number of zone creation requests per hour that can be sent via the API?
Found a message about 11 (?) and 30 - .
In the list of errors in the dock (https://support.cloudflare.com/hc/en-us/articles/360029779472-Troubleshooting-Cloudflare-1XXX-errors) 1117 is simply missing.
Any ideas?

Related

refreshing StubHub API tokens?

We are trying to refresh a previously working application's refresh tokens as per stub-hub's developers docs with the following commands (where <whatever> are account specific placeholders).
ENCRYPTED_ACCT=$(echo -n "<client-id>:<client-secret>" | base64);
curl -X POST "https://account.stubhub.com/oauth2/token" \
-u "${ENCRYPTED_ACCT}" --basic \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=refresh_token" \
-d "refresh_token=<PREV_REFRESH_TOKEN>" \
--data-urlencode "scope=read:events";
In the past we've followed a similar flow (api changed since). But now with the recommended procedure the endpoint is failing due to invalid credentials for the ENCRYPTED_ACCT. Can anyone post a functioning workflow to refresh tokens of an existing account?

Authentication error using cloudflare api

I repeatedly received an authentication error just like this (not me) when using the Cloudflare api.
curl -X GET "https://api.cloudflare.com/client/v4/zones/<ZONEID>/dns_records?type=A&name=<DOMAIN>&content=127.0.0.1&proxied=undefined&page=1&per_page=20&order=type&direction=desc&match=all" \
-H "X-Auth-Email: <EMAIL>" \
-H "X-Auth-Key: <APITOKEN>" \
-H "Content-Type: application/json"
{“success”:false,“errors”:[{“code”:10000,“message”:“Authentication error”}]}
What am I doing wrong?
I was getting that exact same error message, and I found out that I was using the API Token instead of the API Key in the X-Auth-Key parameter.
Apparently the only way that seems to work is to use the user token instead of the zone one.
curl -XPOST -H 'X-Auth-Key: TOKEN' -H 'X-auth-email: EMAIL' -H \"Content-type: application/json\" -d '{\"type\":\"CNAME\",\"name\":\"hi\",\"content\":\"example.com\",\"proxied\":true}' 'https://api.cloudflare.com/client/v4/ZONE_ID/dns_records'

How to get a Yelp access token

I am trying to use the yelp fusion api but cannot seem to find out how to format the url. I have read the get started page but do not understand it. I just need to know where to put what. This is what I have so far:
https://api.yelp.com/oauth2/token?grant_type=client_credentials&client_id=ID&client_secret="CLIENT SECRET"
When I load this url it says "VALIDATION_ERROR." What am I doing wrong?
The grant_type,client_id and client_secret should be sent in application/x-www-form-urlencoded format in the POST call.
curl -X POST \
https://api.yelp.com/oauth2/token \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials&client_id=CLIENT_ID&client_secret=CLIENT_SECRET'

Google FCM - can not subscribe to topic - returns 502 or "error INTERNAL"

Trying to subscribe device token to a topic on server. According to FCM server docs proceeding the request:
curl --header "Authorization: key=AAAA...qC1GXg" \
--header "Content-Type:application/json" \
-X POST -d '{}' \
"https://iid.googleapis.com/iid/v1/BY7kK...rbZ/rel/topics/mytopic"
which returns :
502. The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds
The same 502 is returned when I'm trying to get token info with "details" parameter, like this:
curl --header "Authorization: key=AAAA...C1GXg" \
"https://iid.googleapis.com/iid/info/BY7kK...rbZ?details=true"
While if not adding "details" parameter, it all ok - it returns 200 and json data:
{"applicationVersion":"24","attestStatus":"UNKNOWN","application":"com.my.app","scope":"*","authorizedEntity":"...","appSigner":"...","platform":"ANDROID"}
I have also tried a batchAdd:
curl --header "Authorization: key=AAAA...81GXg" \
--header "Content-Type:application/json" \
-X POST \
-d '{"to":"/topics/mytopic", "registration_tokens": ["BY7k...rbZ"]}' \
"https://iid.googleapis.com/iid/v1:batchAdd"
and it ends up with :
{"results":[{"error":"INTERNAL"}]}
Authorization key and device token I use should be OK, since I can get token data (without topics), and sending messages to that device (also using curl) works OK.
Still, this 502 is happening for more than 24h for me so far.
That's a new FCM project - I'm not migrating from GCM or anything. Android app is live on market for some time, but I haven't used cloud messaging there before.
Any ideas with what could be wrong here? Thank you.
Found the cause. In case if someone will make the same mistake:
My Android app is published under one Google account, while I have created a project in Firebase console under a different account.
Having the app and Firebase project under same Google account - and all works like a charm.
Meanwhile, Google maps API keys, which also are used in my Android app, were generated under that second account, and everything is OK.

Get image list using Orange Cloud API

Using the endpoint /folders of the Orange Cloud API, I can only get the listing of the files in the main directory:
curl -X GET -H "X-Orange-CA-ESID: OFR-2588c...2e64f249ab" -H \
"Authorization: Bearer OFR-2588c...2e64f249ab" \
https://api.orange.com/cloud/v1/folders/Lw
How could I get photos entries only, including the ones in subdirectories?
You can get all photos this way:
curl -X GET \ -H \
-H "Authorization: Bearer OFR-948ef5..." \
"https://api.orange.com/cloud/v1/folders?filter=image&flat=true"
By the way, the session header is no more necessary
https://developer.orange.com/apis/cloud-france/getting-started#filtering-on-photos,-videos,-audio-files