> For the complete documentation index, see [llms.txt](https://help.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.autify.com/nocode-mobile/troubleshooting/trobleshooting-local-device/how-to-resolve-api-connectivity-check-failed-failed-to-access-server.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# autify mobile link doctor コマンド実行後、「API接続のチェックに失敗しました：サーバーへのアクセスに失敗しました」と表示されました。どのように対処すれば良いですか？

## 状況

`autify mobile link doctor` コマンド実行後、コマンドラインインターフェイス上に「API接続のチェックに失敗しました：サーバーへのアクセスに失敗しました」と表示される。

## 対処方法

### 1. Autify API を直接呼び出せるか確認する

ローカル実機実行時に必要なMobile linkという仕組みを介さず、直接Autify APIへアクセス可能かを確認するため、以下の手順でコマンドの実行をお試しください。

1. Autifyの設定画面より、[新しいパーソナルアクセストークン(API認証トークン)を作成](https://help.autify.com/nocode-mobile/using-autify-nocode-mobile/integrations/api-integration.md#api-authentication-token-generation-method)します。
2. 以下のコード内にある \<ACCESS\_TOKEN> を、1で生成したお客様のトークンに書き換えます。
3. 以下のコード内にある \<PROJECT\_ID> を、お客様の[ワークスペースのID](https://help.autify.com/nocode-mobile/using-autify-nocode-mobile/execution-environments/local-device/setup-procedure-for-recording-and-test-execution-on-a-local-device-ios.md)に書き換えます。
4. 書き換えたコードをコマンドラインインターフェイス画面に貼り付けて実行します。

```bash
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
"https://mobile-app.autify.com/api/v1/projects/<PROJECT_ID>/results"\
```

もし上記コマンドで正常にレスポンスが返ってこない（アクセスできない）場合は、貴社内のITチームのご担当者さまへ「外部API（Autify）への接続許可 (<https://mobile-app.autify.com/api/> 配下へのアクセスを許可してもらうようにする) 」についてご確認いただき、接続できるようご依頼をお願いします。

### 2. SSL通信の影響を確認する

外部API (Autify) へ接続できる状態であっても、引き続き「サーバーへのアクセスに失敗しました」が表示される場合は、お客様がご利用されているSSL通信が影響していることも原因の一つとして考えられます。もし、SSL証明書を無効化した状態でAutify サーバーへのアクセスが可能であれば、SSLが影響している可能性があります。 コマンドラインインターフェイス上にてSSL検証を無効化した状態で doctor と start の両方をテストするために、以下のコマンドを実行してみてください。問題なく接続できた場合、貴社にてAutifyに接続できるようネットワークの対処をお願いします。

{% hint style="danger" %}
**注意**

以下は問題の切り分けをする目的でご利用いただき、定常的にご利用することはお控えください。
{% endhint %}

#### Mac OSをご利用の場合

```
NODE_TLS_REJECT_UNAUTHORIZED=0 autify mobile link doctor
NODE_TLS_REJECT_UNAUTHORIZED=0 autify mobile link start
```

#### Windowsをご利用の場合

```
# Windows Command Prompt
set NODE_TLS_REJECT_UNAUTHORIZED=0
autify mobile link doctor
autify mobile link start
```

```
# Windows PowerShell
$env:NODE_TLS_REJECT_UNAUTHORIZED=0
autify mobile link doctor
autify mobile link start
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.autify.com/nocode-mobile/troubleshooting/trobleshooting-local-device/how-to-resolve-api-connectivity-check-failed-failed-to-access-server.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
