how to enable Phone-message via "auth0-deploy-cli" SDK - sdk

Need
on deployment of config via "auth0-deploy-cli", I want to enable “Phone Message” inside “Multi-factor Authentication”… following the exact example as seen here
this is the option:
but getting the response:
auth0-deploy-cli returned errors for MY_TENANT, Schema validation failed loading [
{
"keyword": "additionalProperties",
"dataPath": ".guardianPhoneFactorMessageTypes",
"schemaPath": "#/properties/guardianPhoneFactorMessageTypes/additionalProperties",
"params": {
"additionalProperty": "message-types"
},
"message": "should NOT have additional properties"
}
]
screenshot:
versions:
Which SDK this is regarding: auth0-deploy-cli
SDK Version: e.g. 7.5.2
Platform Version: e.g. Node 14
Note:
I am able to set Twilio field settings as per the example in the link
I am able to enable/disable OTP as per the example in the link
only this phone message option is not toggling like the others

Related

Getting a list of all Media in Instagram with Graph API

In my code, I have been pulling the list of media in Instagram using the following URL:
https://graph.facebook.com/{app_id}/media?fields=media_url,{..some fields here...}&limit=10000&access_token={my_access_token}
This was working fine and I didn't touch the code for a month. Now suddenly it gives the error:
{
"error": {
"message": "(#100) Tried accessing nonexisting field (media) on node type (Application)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "Aty4vnPpLWfGq9Hj6hQFtZR"
}
}
Nothing in the documentation says that media is no longer available. Graph API version has updated from v14 to v15 since I used it, but the request isn't working on either version.
Access token is fine because other requests are working correctly.
Does anyone have any insights? What alternatives do I have?
I think you are defining an invalid field. Below is a list of fields you can use. Also i suggest you also try instagram account id instead of app_id.
fields=[id,ig_id,media_product_type,media_type,media_url,thumbnail_url,timestamp,
username,like_count,comments_count]
final url:
https://graph.facebook.com/v14.0/{instagram_account_id}/media?fields=id,ig_id,media_product_type,media_type,media_url,thumbnail_url,timestamp,
username,like_count,comments_count&access_token={my_access_token}

FIWARE Metadata in IoTAgent

I try to set up a TTN based LoRaWAN Monitoring of my Gateways and devices inside a FIWARE-Environment. Therefore it would be essential to access data not in payload_field of the MQTT-Broker of TTN.
I wonder if it is possible to access field like counter, port, app_id and metadata.
I did not find a possibility yet. Does any of you face the same problem and got a solution to this challenge?
I use the following relevant FIWARE-components in a docker environment:
fiware/orion:2.2.0
fiware/iotagent-lorawan:1.2.3
mongo:3.6.8
If you need to receive metadata directly from LoRaWAN, you will have to customize the code within the LoRaWAN IoT Agent - this just passes measures by default, but the IoT Agent node lib interface is capable of receiving metadata as well.
Alternatively a recent PR Request for the IoT Agent node lib allows for additional static metadata to be added during the provisioning stage and sent as part of the requests to the context broker. You would need to use the latest development code base as the library hasn't been ported to the LoRaWAN IoT Agent yet - amend the iotagent-node-lib dependency in the package.json as shown:
"dependencies": {
...
"iotagent-node-lib": "git://github.com/telefonicaid/iotagent-node-lib.git#master",
...
},
... etc
The documentation can be found here
Attributes with metadata are provisioned with an additional parameter as shown:
"attributes": [
{"object_id": "s", "name": "state", "type":"Text"},
{"object_id": "l", "name": "luminosity", "type":"Integer",
"metadata":{
"unitCode":{"type": "Text", "value" :"CAL"}
}
}

How to send a device management request using NodeRed or any REST client

I am trying to sent a DM firmware update command from a NodeRed Flow.
Function node:
msg.payload = {"MgmtInitiationRequest": {
"action":"firmware/update",
"devices": [{
"typeId": "myType",
"deviceId": "myDevice"
}]
}}
msg.headers={"Content-Type":"application/json"}
return msg;
I send it to a http request node with a POST to
https://orgid.internetofthings.ibmcloud.com/api/v0002/mgmt/requests
Basic Authentication with api keys. I based it of Initiate a device management request
I get back a 403 which the docs have as:
One or more of the devices does not support the requested action
Anyone see what I'm missing? It works fine from the IoT Platform UI to the same devicetype/deviceid.
EDIT: Same 403 if I use a Rest client like Postman.
The swagger API documentation is a little bit misleading in that the 'body' parameter is given a name.
But, like the other POST APIs, that name isn't actually included anywhere as part of the payload.
The payload should just look like this:
{
"action": "firmware/update",
"devices": [
{
"typeId": "string",
"deviceId": "string"
}
]
}
This page in the documentation provides more detail:
https://console.ng.bluemix.net/docs/services/IoT/devices/device_mgmt/requests.html#firmware-actions-update
Has your appliance published the set of supported commands it supports when it announced itself as a managed device?
A device connects to the Watson IoT Platform and uses the managed devices operation to become a managed device.
Which looks something like this
Topic: iotdevice-1/mgmt/manage
{
...
"supports": {
"deviceActions": true,
"firmwareActions": boolean
},
...
},
...
}
https://console.ng.bluemix.net/docs/services/IoT/devices/device_mgmt/index.html

Getting Issue Type Scheme and Workflow Scheme for JIRA project using REST API

I'm doing an integration for JIRA using REST API 6.2.6. One thing that I need to do is to get Issue Type Scheme and Workflow Scheme for a project.
What I tried:
Issue Type Scheme
The only thing that I can get right now is a list of issue types using /rest/api/2/project/{projectIdOrKey}. I can't see any way of getting an ID of Issue Type Scheme. Looking at API there is no any endpoints for issue type schemes, so I guess it's not possible.
Workflow Scheme
/rest/api/2/project/{projectIdOrKey} doesn't return any information about Workflow Scheme. But there is an endpoint /rest/api/2/workflowscheme/{id}, so that means that it's possible to get ID somehow... At the end I want to get a list of workflows for a project to check transitions for an issue type.
Question
Is there any way to get the data I want? Maybe there is some hidden not documented API?
Note: I'm using only JIRA REST API.
This is what you want.
/rest/projectconfig/1/workflowscheme/{projectIdOrKey}
Latest Jira documentation provides information about the APIs which can be used to fetch details for issuetype scheme and workflow scheme. Below are the APIs which can be used for the same,
Fetching Issue type Scheme for a project Issuetype Scheme API
Rest URL:GET https://your-domain.atlassian.com/rest/api/2/issuetypescheme/project?projectId={projectId}'
Sample Response:
{
"maxResults": 100,
"startAt": 0,
"total": 3,
"isLast": true,
"values": [
{
"issueTypeScheme": {
"id": "10000",
"name": "Default Issue Type Scheme",
"description": "Default issue type scheme is the list of global issue types. All newly created issue types will automatically be added to this scheme.",
"defaultIssueTypeId": "10003",
"isDefault": true
},
"projectIds": [
"10000",
"10001"
]
}
]
}
Fetching workflow scheme configured for a project Workflow Scheme API
REST URl: GET https://your-domain.atlassian.com/rest/api/2/workflowscheme/{id}
Sample Response:
{
"id": 101010,
"name": "Example workflow scheme",
"description": "The description of the example workflow scheme.",
"defaultWorkflow": "jira",
"issueTypeMappings": {
"10000": "scrum workflow",
"10001": "builds workflow"
},
"draft": false,
"self": "https://your-domain.atlassian.net/rest/api/2/workflowscheme/101010"
}
As far as I am aware you can get the correct XML or JSON response from the
REST API:
/rest/api/2/project/{projectIdOrKey}.
Then if you want to find out the information about the workflowscheme you can do this programmatically by using the following information.
If you have an issue that you want to use then you can use it to get the workflowscheme id by doing this this:
ComponentAccessor.getWorkflowSchemeManager().getWorkflowScheme(issue.getProject()).get("id");
Then once you get the id of the workflow scheme e.g. 10, you then can get the scheme generic value as follows:
GernericValue scheme = ComponentAccessor.getWorkflowSchemeManager().getScheme(10);
Now that you have the scheme you then can get all of the workflows that are referenced in the scheme by doing this:
Collection<JiraWorkflow> workflows = ComponentAccessor.getWorkflowManager().getWorkflowsFromScheme(scheme);
Then if you want to get one workflow you will have to use:
workflows.iterator().next():
Also note, that workflows are identified by their name in JIRA as there are no id's in JiraWorkflow.
So that would be the approach I would use if I wanted to find out the workflowscheme information so I could use the id to then use the REST API:
But the main reason that you might not be able to find a workflowscheme is because it is not present in the JIRA's Issue.
Using this HTTP and inputting it into "Postman" as a get request will return all the JSON information.
Using this https://jira.atlassian.com/browse/JRA-25121/project/23 will return all the information for that project. Then using this REST API:
/rest/api/2/workflowscheme/{id}
Using this HTTP get request https://jira.atlassian.com/browse/JRA-25121/workflow/45 will get you the returned XML or JSON workflow information too.

Google Custom Search: 403 error in iOS

Google Custom Search is returning this 403 error from my iPhone 7.1 app. This is the response when run in the simulator:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
"code": 403,
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
}
Is there a flaw in the steps below? I’d like to establish a working CSE setup process specific to iOS apps. The screenshots at each step will hopefully help and not confuse!
Create a Custom Search Engine (CSE) at https://www.google.com/cse/
From Setup -> Basics, get the Search engine ID.
Test the CSE at https://developers.google.com/apis-explorer/#p/customsearch/v1/search.cse.list
Set "q" to any test query terms ("foo bar") and "cx" to the Search engine ID in step 2.
Press "Execute" and receive your search results. They work. Google also provides this URL which we'll re-use in Xcode in step 8.
To get ourselves a key for ID and billing purposes, create a new project at https://console.developers.google.com/
Under APIs & auth -> APIs -> Enable "Custom Search API." No other APIs are enabled.
Under APIs & auth -> Credentials -> Create a new iOS key.
Note: I also tried a browser key and the search result returned "Error 400: Invalid Value." I returned to the iOS key since I'm on iOS and the error seemed less severe.
Add to this key your bundle identifier from Xcode.
In Xcode make your GET request to the URL in step 3. Replace {YOUR_API_KEY} with the key from your credentials in steps 6-7.
NSData *response contains the error 403 shown above. Thanks for any thoughts on what's wrong!
It was missing the header field X-Ios-Bundle-Identifier.
NSString *bundleID = #"com.yourCompany.yourApp";
//...define request as above
[request setHTTPMethod:#"GET"];
[request setValue:bundleID forHTTPHeaderField:#"X-Ios-Bundle-Identifier"];

Resources