Pinterest API 搜索不再起作用 [英] Pinterest API search not working anymore

查看:58
本文介绍了Pinterest API 搜索不再起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找 pinterest API 端点...

I was looking for pinterest API endpoints...

我创建了一些 URL..

I've founded some URL..

https://api.pinterest.com/v3/domains/<domains>/search/pins/?query=<query>&access_token=<access_token>

我能够生成 access_token..但是每次我在该 URL 上尝试 POST 时,它都会给我:

I was able to generate the access_token..but every time I've tried a POST on that URL it gave me:

{  
    "status":"failure",
    "code":12,
    "host":"ngapi2-b2fc674c",
    "generated_at":"Mon, 09 Feb 2015 17:45:29 +0000",
    "message":"Something went wrong on our end. Sorry about that.",
    "data":"path: /v3/domains/www.vtracker.com.br/search/pins/\nparams:
            [('access_token', [u'blablahblahblah']), ('query', 
            [u'como'])]\nTraceback (most recent call last):\n  File 
            \"/mnt/virtualenv/local/lib/python2.7/site-packages/flask/app.py\", 
            line 1504, in wsgi_app\n    response = 
            self.full_dispatch_request()\n  File 
            \"/mnt/virtualenv/local/lib/python2.7/site-packages/flask/app.py\", 
            line 1264, in full_dispatch_request\n    rv = 
            self.handle_user_exception(e)\n  File 
            \"/mnt/virtualenv/local/lib/python2.7/site-packages/flask/app.py\", 
            line 1262, in full_dispatch_request\n    rv = 
            self.dispatch_request()\n  File 
            \"/mnt/virtualenv/local/lib/python2.7/site-packages/flask/app.py\", 
            line 1248, in dispatch_request\n    return 
            self.view_functions[rule.endpoint](**req.view_args)\n  File 
            \"../api/pin_api.py\", line 715, in __call__\n    
            self._perform_auth()\n  File \"../api/pin_api.py\", line 848, in 
            _perform_auth\n    authorization.perform(dictified_values, 
            request.cookies, request.headers)\n  File \"../api/pin_api.py\", 
            line 271, in perform\n    params, cookies, headers)\n  File 
            \"../api/pin_api.py\", line 121, in perform\n    headers=headers)\n  
            File \"../api/decorators.py\", line 212, in 
            verify_user_authorization\n    
            core.Consumer.manager.get_scope_as_int(required_scope)):\n  File 
            \"../core/managers/consumer_manager.py\", line 479, in 
            check_scope\n    scope = migrate_legacy_scope(scope)\n  File 
            \"../core/managers/consumer_manager.py\", line 475, in 
            migrate_legacy_scope\n    if ~scope & old == 0:\nTypeError: bad 
            operand type for unary ~: 'NoneType'\n"
}

Pinterest API v3 是否已关闭或出现其他问题?

Is Pinterest API v3 closed or some other problem is going on?

谢谢

推荐答案

您必须首先确保您的应用已获得 Pinterest 的批准.您可能需要重新申请批准(我必须重新申请我的应用程序).获得批准后,您将在应用程序页面上看到一个名为访问 API 文档"的链接.这将链接到 V3 文档(https://developers.pinterest.com/docs/redoc/pinner_app).至少,这是我有权访问的文档.如果您有其他类型的应用,也许您可​​以访问其他文档.

You must first ensure that your app has been approved by Pinterest. You may need to reapply for approval (I had to reapply for my app). Once you are approved, you will see a link on your app page called "Visit API docs". This will link to the V3 documentation (https://developers.pinterest.com/docs/redoc/pinner_app). At least, this is the documentation I have been given access to. If you have a different type of app, maybe you will have access to other documentation.

在您的应用获得批准后,您将感兴趣的文档部分是搜索用户图钉".(https://developers.pinterest.com/docs/redoc/pinner_app/#tag/search).

After your app has been approved, the section of the documentation you will be interested in is "Search user pins" (https://developers.pinterest.com/docs/redoc/pinner_app/#tag/search).

端点为:https://api.pinterest.com/v3/search/user_pins/{user}/

文档提供了有关允许的查询参数和响应数据的详细信息.

The documentation provides details about the query parameters that are allowed and the response data.

这篇关于Pinterest API 搜索不再起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆