Are you sure you're passing in a valid access token? I recommend printing out the $token just before you set the headers. It should be a 64 character string consisting of letters, numbers, and some symbols.","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"203","kudosSumWeight":0,"postTime":"2017-12-04T11:59:11.901-08:00","lastPublishTime":"2017-12-04T11:59:11.901-08:00","metrics":{"__typename":"MessageMetrics","views":3723},"visibilityScope":"PUBLIC","placeholder":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"entityType":"FORUM_REPLY","eventPath":"category:101000041/category:101007/category:English/community:mxpez29397board:101000014/message:255242/message:255274","replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"MessageEdge","cursor":"MjUuMnwyLjF8aXwzfDUyOjF8aW50LDI1NTI3OCwyNTUyNzg","node":{"__ref":"ForumReplyMessage:message:255278"}}]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"editFrozen":false,"body@stringLength":"274","rawBody":"Thanks! I just tried this out, and it's working for me.
Are you sure you're passing in a valid access token? I recommend printing out the $token just before you set the headers. It should be a 64 character string consisting of letters, numbers, and some symbols.","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"timeToRead":1,"currentRevision":{"__ref":"Revision:revision:255274_1"},"latestVersion":null,"messagePolicies":{"__typename":"MessagePolicies","canModerateSpamMessage":{"__typename":"PolicyResult","failureReason":{"__typename":"FailureReason","message":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","key":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","args":[]}}}},"ModerationData:moderation_data:255278":{"__typename":"ModerationData","id":"moderation_data:255278","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:255278":{"__typename":"ForumReplyMessage","uid":255278,"id":"message:255278","revisionNum":1,"author":{"__ref":"User:user:476427"},"readOnly":false,"repliesCount":8,"depth":4,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:101000014"},"parent":{"__ref":"ForumReplyMessage:message:255274"},"conversation":{"__ref":"Conversation:conversation:255242"},"subject":"Re: Access token is not being accepted from local server","moderationData":{"__ref":"ModerationData:moderation_data:255278"},"body":"My issue is not with the code itself, because I've received a successful response when I've used it on phpfiddle.com. My issue is that I'm getting an error response on my local virtual server, and I have no clue why. I am hoping you may have some insight.
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"203","kudosSumWeight":0,"postTime":"2017-12-04T12:31:35.832-08:00","lastPublishTime":"2017-12-04T12:31:35.832-08:00","metrics":{"__typename":"MessageMetrics","views":3721},"visibilityScope":"PUBLIC","placeholder":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"entityType":"FORUM_REPLY","eventPath":"category:101000041/category:101007/category:English/community:mxpez29397board:101000014/message:255242/message:255278","replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"MessageEdge","cursor":"MjUuMnwyLjF8aXwxfDUyOjF8aW50LDI1NTI3OSwyNTUyNzk","node":{"__ref":"ForumReplyMessage:message:255279"}}]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"editFrozen":false,"body@stringLength":"262","rawBody":"My issue is not with the code itself, because I've received a successful response when I've used it on phpfiddle.com. My issue is that I'm getting an error response on my local virtual server, and I have no clue why. I am hoping you may have some insight.
","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"timeToRead":1,"currentRevision":{"__ref":"Revision:revision:255278_1"},"latestVersion":null,"messagePolicies":{"__typename":"MessagePolicies","canModerateSpamMessage":{"__typename":"PolicyResult","failureReason":{"__typename":"FailureReason","message":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","key":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","args":[]}}}},"ModerationData:moderation_data:255279":{"__typename":"ModerationData","id":"moderation_data:255279","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:255279":{"__typename":"ForumReplyMessage","author":{"__ref":"User:user:10"},"id":"message:255279","revisionNum":1,"uid":255279,"depth":5,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:101000014"},"parent":{"__ref":"ForumReplyMessage:message:255278"},"conversation":{"__ref":"Conversation:conversation:255242"},"subject":"Re: Access token is not being accepted from local server","moderationData":{"__ref":"ModerationData:moderation_data:255279"},"body":"That indicates that something is wrong with the API request when made from your server. You'll need to inspect the request being made on your server. Since you're getting a 401, it seems likely that there is an issue with the access token. More generally, if you can print out the actual HTTP request that would likely be helpful.
I'd be happy to take a look, but please don't post any output that contains an actual access token of course.","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"203","kudosSumWeight":0,"repliesCount":7,"postTime":"2017-12-04T12:34:59.489-08:00","lastPublishTime":"2017-12-04T12:34:59.489-08:00","metrics":{"__typename":"MessageMetrics","views":3719},"visibilityScope":"PUBLIC","placeholder":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"entityType":"FORUM_REPLY","eventPath":"category:101000041/category:101007/category:English/community:mxpez29397board:101000014/message:255242/message:255279","customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"readOnly":false,"editFrozen":false,"body@stringLength":"451","rawBody":"That indicates that something is wrong with the API request when made from your server. You'll need to inspect the request being made on your server. Since you're getting a 401, it seems likely that there is an issue with the access token. More generally, if you can print out the actual HTTP request that would likely be helpful.
I'd be happy to take a look, but please don't post any output that contains an actual access token of course.","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"timeToRead":1,"currentRevision":{"__ref":"Revision:revision:255279_1"},"latestVersion":null,"messagePolicies":{"__typename":"MessagePolicies","canModerateSpamMessage":{"__typename":"PolicyResult","failureReason":{"__typename":"FailureReason","message":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","key":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","args":[]}}}},"CachedAsset:text:en_US-components/tags/TagView/TagViewChip-1741624997000":{"__typename":"CachedAsset","id":"text:en_US-components/tags/TagView/TagViewChip-1741624997000","value":{"tagLabelName":"Tag name {tagName}"},"localOverride":false},"Revision:revision:255278_1":{"__typename":"Revision","id":"revision:255278_1","lastEditTime":"2017-12-04T12:31:35.832-08:00"},"Revision:revision:255274_1":{"__typename":"Revision","id":"revision:255274_1","lastEditTime":"2017-12-04T11:59:11.901-08:00"},"Revision:revision:255279_1":{"__typename":"Revision","id":"revision:255279_1","lastEditTime":"2017-12-04T12:34:59.489-08:00"}}}},"page":"/forums/ForumMessagePage/ForumMessagePage","query":{"boardId":"101000014","messageSubject":"access-token-is-not-being-accepted-from-local-server","messageId":"255242","replyId":"255264"},"buildId":"G6LFdF6Y8sb5g8rZyM3sC","runtimeConfig":{"buildInformationVisible":false,"logLevelApp":"info","logLevelMetrics":"info","openTelemetryClientEnabled":false,"openTelemetryConfigName":"dropbox","openTelemetryServiceVersion":"25.2.0","openTelemetryUniverse":"prod","openTelemetryCollector":"http://localhost:4318","openTelemetryRouteChangeAllowedTime":"5000","apolloDevToolsEnabled":false,"inboxMuteWipFeatureEnabled":false},"isFallback":false,"isExperimentalCompile":false,"dynamicIds":["./components/seo/QAPageSchema/QAPageSchema.tsx","./components/community/Navbar/NavbarWidget.tsx","./components/community/Breadcrumb/BreadcrumbWidget.tsx","./components/customComponent/CustomComponent/CustomComponent.tsx","./components/messages/TopicWithThreadedReplyListWidget/TopicWithThreadedReplyListWidget.tsx","./components/nodes/NodeActionButtonWidget/NodeActionButtonWidget.tsx","./components/nodes/NodeInformationWidget/NodeInformationWidget.tsx","./components/messages/RelatedContentWidget/RelatedContentWidget.tsx","./components/messages/MessageListForNodeByRecentActivityWidget/MessageListForNodeByRecentActivityWidget.tsx","./components/messages/MessageView/MessageViewStandard/MessageViewStandard.tsx","./components/customComponent/CustomComponentContent/HtmlContent.tsx","./components/nodes/NodeView/NodeView.tsx","./components/nodes/NodeView/NodeViewCard/NodeViewCard.tsx","../shared/client/components/common/List/UnstyledList/UnstyledList.tsx","./components/messages/MessageView/MessageView.tsx","./components/messages/MessageView/MessageViewInline/MessageViewInline.tsx","../shared/client/components/common/Pager/PagerLoadMore/PagerLoadMore.tsx","./components/customComponent/CustomComponentContent/TemplateContent.tsx","./components/customComponent/CustomComponentContent/CustomComponentScripts.tsx","../shared/client/components/common/List/UnwrappedList/UnwrappedList.tsx","./components/tags/TagView/TagView.tsx","./components/tags/TagView/TagViewChip/TagViewChip.tsx"],"appGip":true,"scriptLoader":[]}