When creating custom collections via rest API ,it says collection unavailable on google ? Does anyone know how to fix this? - shopify

When creating custom collections using rest API ,The collection appears to show unavailable on google ,How to fix this ? so that it appears on Google.

Google is a Sales Channel in your store? Therefore it is up to you to tick off the box to make that collection available to Google the Sales Channel. That is the first thing you should do anyway. Go to your Admin and turn your collection on to that Sales Channel.
If you do not have access to the Admin, you will have to ask the merchant to do that for you as there are no API calls that allow you to do this, as far as I know, it may remain the domain of Plus stores only. You can check that further.

Related

Shopify Disable product from channels (Publication assess)

I've been trying to disable products via API from specific channels, other than the "Online Store" but with no luck for now.
Currently, I'm able to disable a product from the "Online Store" sales channel with "published: false", but this property is listed as deprecated and suggested to use the Publication object.
Requesting the Publication object keeps requiring the read_publications,write_publications access, but these scopes are missing as it says "Oauth error missing_shopify_permission: read_publications,write_publications".
Here https://community.shopify.com/c/Shopify-APIs-SDKs/write-publications-and-read-publications-access/m-... I saw that there is a follow-up which can help in achieving this, but I still got no response from Shopify forums or support regarding it.
My app is a public one and the functionality I need to create is to disable the specific product from all sales channels and then enable it only on the "Online store" channel.
I found an app that manages to do that, so I think there should be a way, but I couldn't find this in the docs. The app's name is "Bulk Product Edit (BPE)"
Any idea how I can get this working?
Regards
If you're trying to control the visibility (publish or unpublish) of a product on a channel other than Point of Sale or Online Store, this is not possible via the API at the moment. You can only disable enable from online store.
"published" is marked as deprecated on GraphQL API but not on Rest Admin API (Search 'Create a new unpublished product'). 
So you can still use the Rest Admin API

Get Page Views via Hubspot API

My Data Science team is trying to pull Hubspot info into their data visualization platform via Hubspot's API.
They're telling me that they can't find the information fora contact's pageview anywhere. I've searched the documentation for the API, contacted Hubspot Support (who told me they can't help with the API), and spent hours googling but I can't find any information on this.
Does the API simply not provide that information? I know it's collected, because I can see page views in a specific contact's timeline...so why can't I access it via API?
Has anyone overcome this challenge in the past or does anyone have any advice?
I should mention that I'm about 10% literate when it comes to anything code related...so I could just be missing something.
Assuming you are using PHP in your API, then you should be able to find the number of page views here:
$objHubSpot->properties->hs_analytics_num_page_views->value
(where $objHubSpot is the name of the HubSpot object returned through API)
If you want to know the actual URL of the visited pages, then keep in mind that HubSpot only keeps a record of the last few URLs.

For Dropbox API is there a way to pull a list of users and see if MFA is enabled?

I am wanting to pull all users in my company dropbox and then check to see if their accounts have MFA enabled. I read over the documentation for Dropbox api but did not see anything stand out where this was possible.
It's very sad to realize that a popular platform such as Dropbox doesn't expose A LOT of basic features through its API (and the SDK itself is far from being OK, compared to G-Suite). Anyway, there are two hacky methods you can use in order to pull out that information (with some limitations).
First method:
By analyzing the team events using team_members_list() you can filter out tfa_change_status_details events. When new_value=TfaConfiguration('[sms|other]', None) is specified - 2FA is enabled.
The information I found out that can be retrieved using this method is:
has_2fa - whether 2FA was ever configured.
is_tfa_enabled - whether 2FA is currently enabled.
tfa_type - whether 2FA is by SMS or by app.
However, keep in mind that you have to track changes constantly and also keep in mind that Dropbox saves team events for only two years.
Second method:
Using the front-end dashboard API this information can be retrieved (I can't remember the API name, I think that it is /2/get_multifactor and inside you'd find some information about its status and the organizational policy regarding 2FA). However, to use the front-end dashboard API (which is totally undocumented) you'd need to simulate a successful login (and correctly use the lid and jar cookies) and you'd also need to bypass the random captcha that appears when you abuse the service with too many requests.
To be honest, Dropbox's API is weak, neglected, and ugly. I wish I never had to use it. Anyway, I would recommend using the first method and pray for a significant update to the API
No, unfortunately the Dropbox API doesn't expose this. We'll consider it a feature request.
There's a feature request open for this one (https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/MFA-status-for-users/m-p/468564#M23886). But I wouldn't hold your breath, as #Aviv mentioned the Dropbox API seems surprisingly neglected at the moment.

Soundcloud API returns empty

Thanks in advance for the help.
So while developing an application, I need API data and I retrieve JSON objects. Not a big deal, but with one certain account it doesn't work.
https://api.soundcloud.com/tracks/257255126?client_id=CLIENT_ID_HERE
The ID 257255126 is a track from this profile: https://soundcloud.com/discoverysounds1/.
Every track from this profile returns empty from the API while the same API link works if I insert a track ID from any other profile.
I've already notified the owner of the problem and he hasn't done anything weird or disabled API access if that's even possible.
What could be the problem here?
Thanks,
Jordan
I just tested this with a website I am developing using the API.
If I add one of the tracks to an existing playlist that I have created to test certain functionality, the track does not appear in the playist when retrieved via the /me/playlists endpoint.
When I load the playlist into the soundcloud widget, the track is visible and unrestricted (as in full duration and not a 30 second preview).
I am seeing similar behaviour with tracks that are marked as "soundcloud go" not being visible in the playlist tracks from the /me/playlists endpoint, but available via the widget when the playlist is loaded (albeit only a 30 second preview in their case).
Those items are identifiable as having a "SUB_HIGH_TIER" monetization_model
The track I loaded from your example
There seem to be various issues with the API right now related to the implementation of "soundcloud go"

when create Order and Customer via API Shopify data not show in Admin panel

I have a problem with Shopify API. I use python API for Shopify. When I create a new order via API, data exists (I check via API too) but it's not shown within Shopify admin panel.
It's pretty likely that you're interacting with two different stores if you're getting 200 OKs and seeing the Orders come back through the API and not through the admin.
It's worth checking shopify.Shop.current().domain to see if it matches up with the admin that you're interacting with. If you're still seeing issues, post the contents of your request (including headers) and it will be a lot easier to give you a hand :)